From a01ce718f792de5cf56f2cde57b1cfd1b4c6dc03 Mon Sep 17 00:00:00 2001 From: Sumapriya Sarvepalli Date: Tue, 31 Jul 2018 16:14:09 +0530 Subject: Sonar major issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace with a single equalsIgnoreCase call Sonar Link: https://sonar.onap.org/project/issues?assigned=false&fileUuids=AWHCr-EdEU5FCDfKtlun&id=org.onap.so%3Aso&open=AWHCr-dlEU5FCDfKtmL0&resolved=false&severities=MAJOR Location: src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java Line No: L110 L115 L120 L124 Change-Id: I36a727a5acf6a911e3f9ad4ca8b548b4c7f1f732 Issue-ID: SO-776 Signed-off-by: Sumapriya Sarvepalli --- .../java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'adapters/mso-vfc-adapter/src/main') diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java index 4d2bf59fee..9b00e4e1eb 100644 --- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java +++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java @@ -107,21 +107,21 @@ public class RestfulUtil { HttpClient client = HttpClientBuilder.create().build(); - if("POST".equals(methodType.toUpperCase())) { + if("POST".equalsIgnoreCase(methodType)) { HttpPost httpPost = new HttpPost(msbUrl); httpPost.setConfig(requestConfig); httpPost.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON)); method = httpPost; - } else if("PUT".equals(methodType.toUpperCase())) { + } else if("PUT".equalsIgnoreCase(methodType)) { HttpPut httpPut = new HttpPut(msbUrl); httpPut.setConfig(requestConfig); httpPut.setEntity(new StringEntity(content, ContentType.APPLICATION_JSON)); method = httpPut; - } else if("GET".equals(methodType.toUpperCase())) { + } else if("GET".equalsIgnoreCase(methodType)) { HttpGet httpGet = new HttpGet(msbUrl); httpGet.setConfig(requestConfig); method = httpGet; - } else if("DELETE".equals(methodType.toUpperCase())) { + } else if("DELETE".equalsIgnoreCase(methodType)) { HttpDelete httpDelete = new HttpDelete(msbUrl); httpDelete.setConfig(requestConfig); method = httpDelete; -- cgit 1.2.3-korg