X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=main%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fapi%2Fmain%2Fstartstop%2FApiCommandLineArguments.java;h=a7c3600618fc962446bef43f2ea7dae98b7f3c0a;hb=452aff5c6948064722836319530420419d40221f;hp=26fca0eab52073feac4b5385b8e3458829177968;hpb=581aa3881e97c36faa23cd812a87d13bdc1a0054;p=policy%2Fapi.git diff --git a/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java b/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java index 26fca0ea..a7c36006 100644 --- a/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java +++ b/main/src/main/java/org/onap/policy/api/main/startstop/ApiCommandLineArguments.java @@ -25,6 +25,7 @@ import java.io.PrintWriter; import java.io.StringWriter; import java.net.URL; import java.util.Arrays; + import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFormatter; @@ -117,8 +118,7 @@ public class ApiCommandLineArguments { final String[] remainingArgs = commandLine.getArgs(); if (remainingArgs.length > 0 && commandLine.hasOption('c') || remainingArgs.length > 0) { - throw new PolicyApiException( - "too many command line arguments specified : " + Arrays.toString(args)); + throw new PolicyApiException("too many command line arguments specified : " + Arrays.toString(args)); } if (remainingArgs.length == 1) { @@ -234,12 +234,5 @@ public class ApiCommandLineArguments { if (!theFile.exists()) { throw new PolicyApiException(fileTag + FILE_MESSAGE_PREAMBLE + fileName + "\" does not exist"); } - if (!theFile.isFile()) { - throw new PolicyApiException( - fileTag + FILE_MESSAGE_PREAMBLE + fileName + "\" is not a normal file"); - } - if (!theFile.canRead()) { - throw new PolicyApiException(fileTag + FILE_MESSAGE_PREAMBLE + fileName + "\" is ureadable"); - } } }