diff options
author | shrek2000 <orenkle@amdocs.com> | 2018-01-08 16:08:42 +0200 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2018-01-09 13:48:02 +0000 |
commit | 85a60551b6cf1a89e6717c52ffd99570a0809ed5 (patch) | |
tree | 1c418b64215b006912ef6a005ebb1828ae913998 /common/openecomp-common-configuration-management/openecomp-configuration-management-core | |
parent | d3886bbaf06392dd14f0f2a0d19521e3943b2954 (diff) |
sonar fix - Stack
Stack is thread safe. For this code block ArrayDeque is good enough.
Issue-ID: SDC-888
Change-Id: Ieddb750ae08626ba73f1e5c92f630a0ba7fe447c
Signed-off-by: shrek2000 <orenkle@amdocs.com>
Diffstat (limited to 'common/openecomp-common-configuration-management/openecomp-configuration-management-core')
-rw-r--r-- | common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java index 8a12d0cfcb..e8dc16efb6 100644 --- a/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java +++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-core/src/main/java/org/openecomp/config/ConfigurationUtils.java @@ -50,7 +50,6 @@ import java.util.Map; import java.util.Queue; import java.util.Set; import java.util.SortedSet; -import java.util.Stack; import java.util.TreeSet; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentLinkedQueue; @@ -64,10 +63,10 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; +import static com.google.common.collect.ImmutableMap.builder; import static org.openecomp.config.api.Hint.EXTERNAL_LOOKUP; import static org.openecomp.config.api.Hint.LATEST_LOOKUP; import static org.openecomp.config.api.Hint.NODE_SPECIFIC; -import static com.google.common.collect.ImmutableMap.*; /** * The type Configuration utils. @@ -982,7 +981,7 @@ public class ConfigurationUtils { * @return the configuration repository key */ public static String getConfigurationRepositoryKey(String[] array) { - Stack<String> stack = new Stack<>(); + Deque<String> stack = new ArrayDeque<>(); stack.push(Constants.DEFAULT_TENANT); for (String element : array) { stack.push(element); |