X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=restapi-call-node%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fccsdk%2Fsli%2Fplugins%2Frestapicall%2FHttpMethod.java;h=b2f618a1c1f3f20fb8f84644b4b6c527ea608973;hb=96856ed3a72873c8a2f2e8163a5e8dda60aafa7a;hp=40dfa3714c91d508a4619a86e8a029efe887df49;hpb=77a6c5f93ce5928dd3a0eb0e71a9120c6603fec6;p=ccsdk%2Fsli%2Fplugins.git 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); }