summaryrefslogtreecommitdiffstats
path: root/client/client-editor/src/main/java
diff options
context:
space:
mode:
authorramverma <ram.krishna.verma@ericsson.com>2018-08-02 12:50:09 +0100
committerramverma <ram.krishna.verma@ericsson.com>2018-08-02 12:50:35 +0100
commite4da736f34d7f1fc91fb1370d29f927a9e2ebe2d (patch)
treeeb8bdb7dfec67512a38e373d0ae16c2a5a103f73 /client/client-editor/src/main/java
parent9e318f20f2e64970bf3c2e3a5532c516231a6f8a (diff)
Fixing sonar vulnerabilities in apex-pdp
Changed the Console class to use logger only for printing stack trace, as the class is meant to be used for CLI usage. Changed the CLIParser to use Console class for printing messages. Changed the client-editor to be hosted on localhost by default, to follow the same what others clients (deployment, monitoring & client full) are doing. Change-Id: I6565b4b35a93b3708b926bfee04d79ead6b5346e Issue-ID: POLICY-954 Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'client/client-editor/src/main/java')
-rw-r--r--client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameterParser.java6
-rw-r--r--client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameters.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameterParser.java b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameterParser.java
index 32ebfba9a..beb589dca 100644
--- a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameterParser.java
+++ b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameterParser.java
@@ -55,9 +55,9 @@ public class ApexEditorParameterParser {
.desc("the amount of time in seconds that the server will run for before terminating. "
+ "Default value is " + ApexEditorParameters.INFINITY_TIME_TO_LIVE + " to run indefinitely.")
.hasArg().argName("TIME_TO_LIVE").required(false).type(Number.class).build());
- options.addOption(Option.builder("l").longOpt("listen").desc("the IP address to listen on. Default value is "
- + ApexEditorParameters.DEFAULT_SERVER_URI_ROOT + " "
- + "to listen on all available addresses. Use value 'localhost' to restrict access to the local machine only.")
+ options.addOption(Option.builder("l").longOpt("listen")
+ .desc("the IP address to listen on. Default value is " + ApexEditorParameters.DEFAULT_SERVER_URI_ROOT
+ + " to restrict access to the local machine only.")
.hasArg().argName("ADDRESS").required(false).type(String.class).build());
}
diff --git a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameters.java b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameters.java
index 16afcd161..e0a2cf727 100644
--- a/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameters.java
+++ b/client/client-editor/src/main/java/org/onap/policy/apex/client/editor/rest/ApexEditorParameters.java
@@ -37,8 +37,8 @@ public class ApexEditorParameters {
// Base URI the HTTP server will listen on
private static final String DEFAULT_SERVER_URI_PREFIX = "http://";
- /** The server listens on all available interfaces/addresses. */
- public static final String DEFAULT_SERVER_URI_ROOT = "0.0.0.0";
+ /** The server listens on localhost by default. */
+ public static final String DEFAULT_SERVER_URI_ROOT = "localhost";
private static final String DEFAULT_REST_PATH = "/apexservices/";
private static final String DEFAULT_STATIC_PATH = "/";