diff options
author | Liam Fallon <liam.fallon@ericsson.com> | 2018-06-08 17:05:17 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-06-08 17:05:17 +0000 |
commit | d0746b062ca6b85eae756db6eb6c4dead037a35a (patch) | |
tree | 896107ee6e4787c42f34225fed944653f18bb2be /model/utilities | |
parent | 6a9b54b275feff5369419a86997e94d0a95fc48e (diff) | |
parent | 697d02bf4e4188e3040cd987dee97d15f397a35f (diff) |
Merge "Adding plugins-event module to apex-pdp"
Diffstat (limited to 'model/utilities')
-rw-r--r-- | model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java index d119a3a35..97face9bd 100644 --- a/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java +++ b/model/utilities/src/main/java/org/onap/policy/apex/model/utilities/TextFileUtils.java @@ -5,15 +5,15 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * + * * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ @@ -26,11 +26,10 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.file.Files; -import java.nio.file.Paths; /** - * The Class TextFileUtils is class that provides useful functions for handling text files. - * Functions to read and wrtie text files to strings and strings are provided. + * The Class TextFileUtils is class that provides useful functions for handling text files. Functions to read and wrtie + * text files to strings and strings are provided. * * @author Liam Fallon (liam.fallon@ericsson.com) */ @@ -49,7 +48,8 @@ public abstract class TextFileUtils { * @throws IOException on errors reading text from the file */ public static String getTextFileAsString(final String textFilePath) throws IOException { - return new String(Files.readAllBytes(Paths.get(textFilePath))); + final File textFile = new File(textFilePath); + return new String(Files.readAllBytes(textFile.toPath())); } /** |