From d7779de1e79a8ce9526e564dcb3bdee9bb570b4b Mon Sep 17 00:00:00 2001 From: shashikanth Date: Tue, 19 Sep 2017 14:09:45 +0530 Subject: Fix Major sonar issues Fix Major sonar issues in policy/drools-applications module https://sonar.onap.org/component_issues?id=org.onap.policy.drools-applications%3Adrools-pdp-apps#resolved=false|severities=MAJOR Add the "@Override" annotation above this method signature "value" is already a string, there's no need to call "toString()" on it Issue-Id:POLICY-239 Change-Id: Ia64ac87c13d88c5d961b943e0b2286b273bd4831 Signed-off-by: shashikanth.vh --- .../src/main/java/org/onap/policy/appc/ResponseValue.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'controlloop') diff --git a/controlloop/common/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseValue.java b/controlloop/common/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseValue.java index 4de0f81f9..7bd745936 100644 --- a/controlloop/common/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseValue.java +++ b/controlloop/common/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseValue.java @@ -33,25 +33,26 @@ public enum ResponseValue { private ResponseValue(String value) { this.value = value; } - + + @Override public String toString() { return this.value; } public static ResponseValue toResponseValue(String value) { - if (value.toString().equals(ACCEPT.toString())) { + if (value.equals(ACCEPT.toString())) { return ACCEPT; } - if (value.toString().equals(ERROR.toString())) { + if (value.equals(ERROR.toString())) { return ERROR; } - if (value.toString().equals(REJECT.toString())) { + if (value.equals(REJECT.toString())) { return REJECT; } - if (value.toString().equals(SUCCESS.toString())) { + if (value.equals(SUCCESS.toString())) { return SUCCESS; } - if (value.toString().equals(FAILURE.toString())) { + if (value.equals(FAILURE.toString())) { return FAILURE; } -- cgit 1.2.3-korg