Removed the deprecated usage of writeStringToFile 37/128237/1
authorsharath reddy <bs.reddy@huawei.com>
Thu, 31 Mar 2022 16:28:21 +0000 (21:58 +0530)
committersharath reddy <bs.reddy@huawei.com>
Thu, 31 Mar 2022 16:29:44 +0000 (21:59 +0530)
Issue-ID: CLI-439

report: tested weather-report

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

profiles/command/src/main/java/org/onap/cli/fw/cmd/cmd/OpenCommandShellCmd.java

index 632142a..3bbdcf6 100644 (file)
@@ -20,6 +20,7 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -328,7 +329,7 @@ public class OpenCommandShellCmd extends OnapCommand {
                 try {
                     FileUtils.touch(new File(tmpFilePath));
                     FileUtils.writeStringToFile(new File(tmpFilePath),
-                            this.getParametersMap().get(paramName).getValue().toString());
+                            this.getParametersMap().get(paramName).getValue().toString(), (Charset) null);
                 } catch (IOException e) {
                     // NO SONAR
                 }