From 98cc3655f6632b4140fd1a419819d3a72ba1add7 Mon Sep 17 00:00:00 2001 From: surya-huawei Date: Tue, 12 Sep 2017 11:07:35 +0530 Subject: Fix Sonar Issues few major issues in sli/core module Issue-Id: CCSDK-87 Change-Id: I1fb86f084d270906dcf61d33701da54a82f2c3a4 Signed-off-by: surya-huawei --- .../src/main/java/org/onap/ccsdk/sli/core/slipluginutils/DME2.java | 2 +- .../org/onap/ccsdk/sli/core/slipluginutils/SvcLogicContextList.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sliPluginUtils/provider/src') diff --git a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/DME2.java b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/DME2.java index 326490d9d..6bdd87e24 100644 --- a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/DME2.java +++ b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/DME2.java @@ -124,7 +124,7 @@ public class DME2 implements SvcLogicJavaPlugin { sb.append("&dme2.partner=" + this.partner); } sb.append("&dme2.allowhttpcode=true"); - return (sb.toString()); + return sb.toString(); } public synchronized String acquireHostName() { diff --git a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SvcLogicContextList.java b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SvcLogicContextList.java index aa25fe374..32e1aebdc 100644 --- a/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SvcLogicContextList.java +++ b/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SvcLogicContextList.java @@ -60,7 +60,7 @@ public class SvcLogicContextList { // Initialize list int capacity = getCtxListLength(ctx, prefix); - this.list = new ArrayList>(capacity); + this.list = new ArrayList<>(capacity); for( int i = 0; i < capacity; i++ ) { this.list.add(i, new HashMap()); } @@ -158,7 +158,7 @@ public class SvcLogicContextList { for( int i = 0; i < this.list.size(); i++ ) { for( Map.Entry entry : this.list.get(i).entrySet() ) { - if( entry.getKey().equals("") ) { + if("".equals(entry.getKey())) { ctx.setAttribute(prefix + '[' + i + ']', entry.getValue()); } else { ctx.setAttribute(prefix + '[' + i + "]." + entry.getKey(), entry.getValue()); -- cgit 1.2.3-korg