summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/appc
diff options
context:
space:
mode:
authorshashikanth <shashikanth.vh@huawei.com>2017-09-19 14:09:45 +0530
committerShashikanth VH <shashikanth.vh@huawei.com>2017-09-20 05:22:45 +0000
commitd7779de1e79a8ce9526e564dcb3bdee9bb570b4b (patch)
tree5a5723fd89a79f815cd9169565321b4b3c8f6b44 /controlloop/common/model-impl/appc
parent5a2b4712b2e1d598950260087101be6fcf59f234 (diff)
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 <shashikanth.vh@huawei.com>
Diffstat (limited to 'controlloop/common/model-impl/appc')
-rw-r--r--controlloop/common/model-impl/appc/src/main/java/org/onap/policy/appc/ResponseValue.java13
1 files changed, 7 insertions, 6 deletions
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;
}