diff options
author | ramverma <ram.krishna.verma@ericsson.com> | 2018-06-08 11:56:21 +0100 |
---|---|---|
committer | ramverma <ram.krishna.verma@ericsson.com> | 2018-06-08 14:07:21 +0100 |
commit | 697d02bf4e4188e3040cd987dee97d15f397a35f (patch) | |
tree | 08c9f3231c155d33827a5651e1e0263d4b8db8be /model | |
parent | 9289ac0afefe62f6c8e9cebddb611a8571bf5642 (diff) |
Adding plugins-event module to apex-pdp
Adding plugins-event module to apex-pdp
Fix a minor bug in TextFileUtils
Change-Id: I393c5f5809d078850d6669d22759ba9fa1b4f0e6
Issue-ID: POLICY-862
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'model')
-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())); } /** |