aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/cli/main/OnapCli.java2
-rw-r--r--main/src/main/java/org/onap/cli/main/utils/OnapCliUtils.java8
2 files changed, 7 insertions, 3 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 c175f67b..0920f84b 100644
--- a/main/src/main/java/org/onap/cli/main/OnapCli.java
+++ b/main/src/main/java/org/onap/cli/main/OnapCli.java
@@ -19,9 +19,7 @@ package org.onap.cli.main;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.apache.commons.io.IOUtils;
import org.onap.cli.fw.OnapCommand;
diff --git a/main/src/main/java/org/onap/cli/main/utils/OnapCliUtils.java b/main/src/main/java/org/onap/cli/main/utils/OnapCliUtils.java
index be88aed0..3ab4cceb 100644
--- a/main/src/main/java/org/onap/cli/main/utils/OnapCliUtils.java
+++ b/main/src/main/java/org/onap/cli/main/utils/OnapCliUtils.java
@@ -261,7 +261,13 @@ public class OnapCliUtils {
private static String readTextStringFromUrl(String input, String argName) throws OnapCliInvalidArgument {
try {
- return FileUtils.readFileToString(new File(input));
+ File file = new File(input);
+ if (file.isFile()) {
+ return FileUtils.readFileToString(file);
+ } else {
+ return input;
+ }
+
} catch (IOException e) {
throw new OnapCliInvalidArgument(argName, e);
}