aboutsummaryrefslogtreecommitdiffstats
path: root/sliPluginUtils
diff options
context:
space:
mode:
authorsurya-huawei <a.u.surya@huawei.com>2017-09-12 11:07:35 +0530
committerSURYA A U <a.u.surya@huawei.com>2017-09-13 04:32:34 +0000
commit98cc3655f6632b4140fd1a419819d3a72ba1add7 (patch)
treecddf88d8d65f51b4363fd5ca2191474c8f627b21 /sliPluginUtils
parentefe32de47055db3223c0fa2c84494a677a28935e (diff)
Fix Sonar Issues
few major issues in sli/core module Issue-Id: CCSDK-87 Change-Id: I1fb86f084d270906dcf61d33701da54a82f2c3a4 Signed-off-by: surya-huawei <a.u.surya@huawei.com>
Diffstat (limited to 'sliPluginUtils')
-rw-r--r--sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/DME2.java2
-rw-r--r--sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/SvcLogicContextList.java4
2 files changed, 3 insertions, 3 deletions
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 326490d9..6bdd87e2 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 aa25fe37..32e1aebd 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<HashMap<String, String>>(capacity);
+ this.list = new ArrayList<>(capacity);
for( int i = 0; i < capacity; i++ ) {
this.list.add(i, new HashMap<String,String>());
}
@@ -158,7 +158,7 @@ public class SvcLogicContextList {
for( int i = 0; i < this.list.size(); i++ ) {
for( Map.Entry<String,String> 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());