From 12a133db6d235b015d3c5cdd2f61952501b36597 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Tue, 26 Sep 2017 18:34:28 +0530 Subject: Fix some major sonar issues *Use collection.isEmpty() instead of collection.size *Remove unnecessary commented line This is done for increasing code readability *Pass the string object directly Instead of wrapping the returned object and creating a new object, passing the object itself will save memory Issue-Id: SO-118 Change-Id: I24c15e9270ec3422d35d3910a8aff9fcf8d632d9 Signed-off-by: surya-huawei --- .../main/java/org/openecomp/mso/adapters/network/BpelRestClient.java | 2 +- .../src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'adapters') diff --git a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java index b7ab5043f3..6c571f3e06 100644 --- a/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java +++ b/adapters/mso-network-adapter/src/main/java/org/openecomp/mso/adapters/network/BpelRestClient.java @@ -166,7 +166,7 @@ public class BpelRestClient { } public String getRetryList() { - if (retryList.size() == 0) + if (retryList.isEmpty()) return ""; String t = retryList.toString(); return t.substring(1, t.length()-1); diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java index a4f1046df9..77e5b856f0 100644 --- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java +++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/BpelRestClient.java @@ -234,7 +234,6 @@ public class BpelRestClient { } private void debug(String m) { LOGGER.debug(m); -// System.err.println(m); } private void sendOne(final String toBpelStr, final String bpelUrl, final boolean isxml) { LOGGER.debug("Sending to BPEL server: "+bpelUrl); -- cgit 1.2.3-korg