* ================================================================================
* 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.
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);
}