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/apihandler/common/BPELRestClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso') diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java index a73eec578d..cd23991875 100644 --- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java +++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/BPELRestClient.java @@ -60,7 +60,7 @@ public class BPELRestClient extends RequestClient { CommonConstants.ENCRYPTION_KEY); if (userCredentials != null) { post.addHeader ("Authorization", - "Basic " + new String (DatatypeConverter.printBase64Binary (userCredentials.getBytes ()))); + "Basic " + DatatypeConverter.printBase64Binary (userCredentials.getBytes ())); } } } -- cgit 1.2.3-korg