summaryrefslogtreecommitdiffstats
path: root/restapi-call-node
diff options
context:
space:
mode:
Diffstat (limited to 'restapi-call-node')
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Format.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Format.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Format.java
index 573c85f7..776485af 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Format.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/Format.java
@@ -25,11 +25,9 @@ public enum Format {
JSON, XML;
public static Format fromString(String s) {
- if (s == null)
- return null;
- if (s.equalsIgnoreCase("json"))
+ if ("json".equalsIgnoreCase(s))
return JSON;
- if (s.equalsIgnoreCase("xml"))
+ if ("xml".equalsIgnoreCase(s))
return XML;
throw new IllegalArgumentException("Invalid value for format: " + s);
}