summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-12-17 11:50:00 +0530
committerSandeep Jha <sandeejh@in.ibm.com>2018-12-17 11:29:01 +0000
commit8b03cbd27ea58435077e8887d4de74dc5e2ac998 (patch)
tree003ac745b275c31bfd6e52f61538a4a83451fce3
parent6dd2c1b07cc306750dd9ee93cf8bb2f615f076aa (diff)
fixed sonar issues in SetNodeExecutor.java
fixed sonar issues Issue-ID: CCSDK-525 Change-Id: I58252cf9acb9eb1c5b70d6137e7b725f036d114f Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/SetNodeExecutor.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/SetNodeExecutor.java b/sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/SetNodeExecutor.java
index 8bebb336..caf0015b 100644
--- a/sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/SetNodeExecutor.java
+++ b/sli/provider-base/src/main/java/org/onap/ccsdk/sli/core/sli/provider/base/SetNodeExecutor.java
@@ -5,6 +5,8 @@
* Copyright (C) 2017 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -111,7 +113,7 @@ public class SetNodeExecutor extends AbstractSvcLogicNodeExecutor {
lhsPrefix = lhsPrefix.substring(0, lhsPrefix.length() - 1);
}
- HashMap<String, String> parmsToAdd = new HashMap<String, String>();
+ HashMap<String, String> parmsToAdd = new HashMap<>();
for (String sourceVarName : ctx.getAttributeKeySet()) {
if (sourceVarName.startsWith(rhsRoot)) {
@@ -125,7 +127,7 @@ public class SetNodeExecutor extends AbstractSvcLogicNodeExecutor {
}
} else {
// If RHS is empty, unset attributes in LHS
- LinkedList<String> parmsToRemove = new LinkedList<String>();
+ LinkedList<String> parmsToRemove = new LinkedList<>();
String prefix = lhsVarName + ".";
String arrayPrefix = lhsVarName + "[";
//Clear length value in case an array exists with this prefix
@@ -143,10 +145,10 @@ public class SetNodeExecutor extends AbstractSvcLogicNodeExecutor {
LOG.debug("Unsetting {} because matching value {} starts with the prefix {}", curCtxVarname, curCtxVarnameMatchingValue, prefix);
parmsToRemove.add(curCtxVarname);
}else if (curCtxVarnameMatchingValue.startsWith(lengthParamName)) {
- LOG.debug("Unsetting {} because matching value {} starts with the lengthParamName {}", curCtxVarname, curCtxVarnameMatchingValue, lengthParamName);
+ LOG.debug("Unsetting {} because matching value {} starts with the lengthParamName {}", curCtxVarname, curCtxVarnameMatchingValue, lengthParamName);
parmsToRemove.add(curCtxVarname);
}else if (curCtxVarnameMatchingValue.startsWith(arrayPrefix)) {
- LOG.debug("Unsetting {} because matching value {} starts with the arrayPrefix {}", curCtxVarname, curCtxVarnameMatchingValue, arrayPrefix);
+ LOG.debug("Unsetting {} because matching value {} starts with the arrayPrefix {}", curCtxVarname, curCtxVarnameMatchingValue, arrayPrefix);
parmsToRemove.add(curCtxVarname);
}
}