Removed thed use of deprecated "readFileToString" 08/128208/1
authorsharath reddy <bs.reddy@huawei.com>
Wed, 30 Mar 2022 14:09:35 +0000 (19:39 +0530)
committersharath reddy <bs.reddy@huawei.com>
Wed, 30 Mar 2022 14:10:43 +0000 (19:40 +0530)
Issue-ID: CLI-439

Signed-off-by: sharath reddy <bs.reddy@huawei.com>
Change-Id: Id2a05e85c9c0e10983854b1049db4d42f4bf3dea

framework/src/main/java/org/onap/cli/fw/utils/OnapCommandUtils.java

index dab6669..acf44a9 100644 (file)
@@ -22,6 +22,7 @@ import static org.onap.cli.fw.conf.OnapCommandConstants.IS_INCLUDE;
 
 import java.io.File;
 import java.io.IOException;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -270,7 +271,7 @@ public class OnapCommandUtils {
                         //start to read after file:filepath
                         String fileName = splEntry.substring(5);
                         try {
-                            value = FileUtils.readFileToString(new File(fileName));
+                            value = FileUtils.readFileToString((new File(fileName)), (Charset) null);
                         } catch (IOException e) {
                             //when file is not found, assign the same file:FILE_PATH
                             //so that it will given hit to user that FILE_PATH to be