diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/src/main/java/org/onap/cli/main/OnapCli.java | 3 | ||||
-rw-r--r-- | main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java | 7 |
2 files changed, 5 insertions, 5 deletions
diff --git a/main/src/main/java/org/onap/cli/main/OnapCli.java b/main/src/main/java/org/onap/cli/main/OnapCli.java index ee9c7b33..08ef640f 100644 --- a/main/src/main/java/org/onap/cli/main/OnapCli.java +++ b/main/src/main/java/org/onap/cli/main/OnapCli.java @@ -17,6 +17,7 @@ package org.onap.cli.main; import java.io.IOException; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -189,7 +190,7 @@ public class OnapCli { public void handleHelp() { try { if (this.printHelp) { - this.print(IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream("oclip-readme.txt"))); + this.print(IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream("oclip-readme.txt") , (Charset) null)); String help = OnapCommandRegistrar.getRegistrar().getHelp(); this.print(help); this.exitSuccessfully(); diff --git a/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java b/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java index d0885def..123521bf 100644 --- a/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java +++ b/main/src/main/java/org/onap/cli/main/utils/OnapCliArgsParser.java @@ -19,6 +19,7 @@ package org.onap.cli.main.utils; import java.io.File; import java.io.IOException; import java.net.URL; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -167,8 +168,6 @@ public class OnapCliArgsParser { "it should be in the form of <key>=<value>"); } - //Make sure to read values from file, in case file path is given. - //map.put(argArr[0], readTextStringFromUrl(argArr[1], paramMap.get(paramName).getName())); map.put(argArr[0], argArr[1]); paramMap.get(paramName).setValue(map); i++; @@ -224,7 +223,7 @@ public class OnapCliArgsParser { try { File file = new File(input); if (file.isFile()) { - return FileUtils.readFileToString(file); + return FileUtils.readFileToString(file, (Charset) null); } else { return input; } @@ -238,7 +237,7 @@ public class OnapCliArgsParser { try { File file = new File(input); if (file.isFile()) { - String value = FileUtils.readFileToString(file); + String value = FileUtils.readFileToString(file, (Charset) null); YamlReader reader = new YamlReader(value); value = (String) reader.read(); return value; |