aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-12-13 19:10:09 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-13 19:10:09 +0000
commit0d1a8d87eadc7a6a6d46b096752a2b80f4cfae9e (patch)
tree776ddd55c8edc1b7836098353532edb1f591b11b
parent66c306fc34c622574f89ff753c9489163c74475c (diff)
parent96856ed3a72873c8a2f2e8163a5e8dda60aafa7a (diff)
Merge "Sonar Fix: HttpMethod.java"
-rw-r--r--restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java
index 40dfa371..b2f618a1 100644
--- a/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java
+++ b/restapi-call-node/provider/src/main/java/org/onap/ccsdk/sli/plugins/restapicall/HttpMethod.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
+ * Modifications Copyright © 2018 IBM.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,15 +28,15 @@ public enum HttpMethod {
public static HttpMethod fromString(String s) {
if (s == null)
return null;
- if (s.equalsIgnoreCase("get"))
+ if (("get").equalsIgnoreCase(s))
return GET;
- if (s.equalsIgnoreCase("post"))
+ if (("post").equalsIgnoreCase(s))
return POST;
- if (s.equalsIgnoreCase("put"))
+ if (("put").equalsIgnoreCase(s))
return PUT;
- if (s.equalsIgnoreCase("delete"))
+ if (("delete").equalsIgnoreCase(s))
return DELETE;
- if (s.equalsIgnoreCase("patch"))
+ if (("patch").equalsIgnoreCase(s))
return PATCH;
throw new IllegalArgumentException("Invalid value for HTTP Method: " + s);
}