From a8a96339680fa1c4df5577285442e902b5637631 Mon Sep 17 00:00:00 2001 From: vasraz Date: Wed, 19 Aug 2020 18:01:52 +0100 Subject: Fix Vulnerabilities reported by SONAR Change-Id: I8f4e173a4ea5111db55eebaf15be86f1583082ad Signed-off-by: Vasyl Razinkov Issue-ID: SDC-3248 --- .../sdc/heat/datatypes/model/HeatPseudoParameters.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'openecomp-be/lib/openecomp-heat-lib/src/main/java') diff --git a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java index 7ed8203bfe..73020bcbcf 100644 --- a/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java +++ b/openecomp-be/lib/openecomp-heat-lib/src/main/java/org/openecomp/sdc/heat/datatypes/model/HeatPseudoParameters.java @@ -23,33 +23,27 @@ package org.openecomp.sdc.heat.datatypes.model; import java.util.ArrayList; import java.util.List; +import lombok.AllArgsConstructor; import lombok.Getter; +@AllArgsConstructor @Getter public enum HeatPseudoParameters { OS_STACK_NAME("OS::stack_name"), OS_STACK_ID("OS::stack_id"), OS_PROJECT_ID("OS::project_id"); - private static List pseudoParameterNames; - private String pseudoParameter; + private static final List pseudoParameterNames = new ArrayList<>(); + private final String pseudoParameter; static { - pseudoParameterNames = new ArrayList<>(); - for (HeatPseudoParameters parameter : HeatPseudoParameters.values()) { + for (HeatPseudoParameters parameter : values()) { pseudoParameterNames.add(parameter.getPseudoParameter()); } } - HeatPseudoParameters(String pseudoParameter) { - this.pseudoParameter = pseudoParameter; - } - public static List getPseudoParameterNames() { return pseudoParameterNames; } - public static void setPseudoParameterNames(List pseudoParameterNames) { - HeatPseudoParameters.pseudoParameterNames = pseudoParameterNames; - } } -- cgit 1.2.3-korg