From e4da736f34d7f1fc91fb1370d29f927a9e2ebe2d Mon Sep 17 00:00:00 2001 From: ramverma Date: Thu, 2 Aug 2018 12:50:09 +0100 Subject: 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 --- .../policy/apex/client/editor/rest/ApexEditorParameterParser.java | 6 +++--- .../onap/policy/apex/client/editor/rest/ApexEditorParameters.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'client/client-editor/src/main/java') 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 = "/"; -- cgit 1.2.3-korg