aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core
diff options
context:
space:
mode:
authorsiddharth0905 <siddharth.singh4@amdocs.com>2018-01-08 12:46:22 +0530
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-01-09 13:21:08 +0000
commit6a96c39bf51c02fef0b35bba8b9e1430a18cbd2b (patch)
treec45db20ab87912c07f8f5b64218d1aa608202911 /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core
parentc9954d1b59d22d68aa731dad434e9989867a6157 (diff)
Fix sonar issues - ConsolidationTypesConnectivity
Private constructor and changed HashMap->EnumMap Change-Id: I9739ecd2726cdca8815c700a242b0036c011b9c0 Issue-ID: SDC-343 Signed-off-by: siddharth0905 <siddharth.singh4@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core')
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationTypesConnectivity.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationTypesConnectivity.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationTypesConnectivity.java
index fab9114252..2edb4fb8f2 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationTypesConnectivity.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationTypesConnectivity.java
@@ -2,7 +2,7 @@ package org.openecomp.sdc.translator.services.heattotosca;
import org.apache.commons.collections.CollectionUtils;
-import java.util.HashMap;
+import java.util.EnumMap;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@@ -11,10 +11,9 @@ import java.util.stream.Stream;
public class ConsolidationTypesConnectivity {
private static Map<ConsolidationEntityType, Set<ConsolidationEntityType>>
- entityToEntitiesWithoutRelationship;
+ entityToEntitiesWithoutRelationship = new EnumMap<>(ConsolidationEntityType.class);
static {
- entityToEntitiesWithoutRelationship = new HashMap<>();
entityToEntitiesWithoutRelationship
.put(ConsolidationEntityType.COMPUTE, getIgnoredComputeRelationships());
entityToEntitiesWithoutRelationship
@@ -23,8 +22,11 @@ public class ConsolidationTypesConnectivity {
.put(ConsolidationEntityType.VOLUME, getIgnoredVolumeRelationships());
entityToEntitiesWithoutRelationship
.put(ConsolidationEntityType.VFC_NESTED, getIgnoredVfcNestedRelationships());
- entityToEntitiesWithoutRelationship.
- put(ConsolidationEntityType.NESTED, getIgnoredNestedRelationships());
+ entityToEntitiesWithoutRelationship
+ .put(ConsolidationEntityType.NESTED, getIgnoredNestedRelationships());
+ }
+
+ private ConsolidationTypesConnectivity() {
}
private static Set<ConsolidationEntityType> getIgnoredComputeRelationships(){