aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2018-12-17 20:53:03 +0000
committerGerrit Code Review <gerrit@onap.org>2018-12-17 20:53:03 +0000
commit558b0f684592d4ff2971a933507622a5895bf5a0 (patch)
tree57486c08aafa79e5d03a170019a72f88057be5f8
parent6bf8fa77703f7afa2e7fa6222ee46ab4aad13d25 (diff)
parent8b03cbd27ea58435077e8887d4de74dc5e2ac998 (diff)
Merge "fixed sonar issues in SetNodeExecutor.java"
-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);
}
}