summaryrefslogtreecommitdiffstats
path: root/client/client-monitoring/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-16 02:03:12 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-16 02:04:11 +0100
commit952d4f5aab9913f961e77fa0457da5d38f31d94f (patch)
treed482ebae10ff11b3096dd85d927eca75825574d6 /client/client-monitoring/src
parenta65e4772f4557a109917532b2d9c49680ce3bb15 (diff)
Fix Sonar issues in apex
Fixing various Sonar issues in apex. Issue-ID: POLICY-1034 Change-Id: Ie693637d75bd7e38c71b7ba04886fb75636276ed Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'client/client-monitoring/src')
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java2
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java8
-rw-r--r--client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java4
3 files changed, 7 insertions, 7 deletions
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java
index f5c8ad8c0..a72fbe0a7 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestParameterParser.java
@@ -38,7 +38,7 @@ import org.apache.commons.cli.ParseException;
*/
public class ApexMonitoringRestParameterParser {
// Apache Commons CLI options
- Options options;
+ private Options options;
/**
* Construct the options for the CLI RESTful services.
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
index f8cee7741..6b7f12061 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ApexMonitoringRestResource.java
@@ -195,9 +195,9 @@ public class ApexMonitoringRestResource {
parameterMap.put("AxArtifactKey#" + engineId, new String[]
{ startStop });
final AxArtifactKey engineKey = ParameterCheck.getEngineKey(parameterMap);
- if (startStop.equals("Start")) {
+ if ("Start".equals(startStop)) {
engineServiceFacade.startEngine(engineKey);
- } else if (startStop.equals("Stop")) {
+ } else if ("Stop".equals(startStop)) {
engineServiceFacade.stopEngine(engineKey);
}
} catch (final Exception e) {
@@ -241,10 +241,10 @@ public class ApexMonitoringRestResource {
parameterMap.put("period", new String[]
{ Long.toString(period) });
final AxArtifactKey engineKey = ParameterCheck.getEngineKey(parameterMap);
- if (startStop.equals("Start")) {
+ if ("Start".equals(startStop)) {
engineServiceFacade.startPerioidicEvents(engineKey, period);
setPeriodicEventsState(host, true);
- } else if (startStop.equals("Stop")) {
+ } else if ("Stop".equals(startStop)) {
engineServiceFacade.stopPerioidicEvents(engineKey);
setPeriodicEventsState(host, false);
}
diff --git a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
index 90527751e..46e1452a5 100644
--- a/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
+++ b/client/client-monitoring/src/main/java/org/onap/policy/apex/client/monitoring/rest/ParameterCheck.java
@@ -173,9 +173,9 @@ public final class ParameterCheck {
}
ParameterCheck.StartStop startStop;
- if (startStopValue[0].equalsIgnoreCase("start")) {
+ if ("start".equalsIgnoreCase(startStopValue[0])) {
startStop = ParameterCheck.StartStop.START;
- } else if (startStopValue[0].equalsIgnoreCase("stop")) {
+ } else if ("stop".equalsIgnoreCase(startStopValue[0])) {
startStop = ParameterCheck.StartStop.STOP;
} else {
LOGGER.warn("value \"{}\"of parameter \"{}\" not \"start\" or \"stop\"", startStopValue[0], startStopPar);