From ed1ab977f02bff4dbbb931cceb8ac9ac676fcd3f Mon Sep 17 00:00:00 2001 From: "r.bogacki" Date: Mon, 29 Jul 2019 13:15:40 +0200 Subject: Vulnerability fixes in ServicePluginFactory Vulnerability fixes in ServicePluginFactory according to the Sonar. -Made constants final. -Changed access scopes from public to private. Issue-ID: SDC-2106 Signed-off-by: Robert Bogacki Change-Id: Iabaca0bd138b5dee22c95a4a0cc6cb5ebe442fd2 --- .../workflow/service/ServicePluginFactory.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'bpmn/so-bpmn-infrastructure-common/src/main/java/org') diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java index 95be6ba7fc..1516f289fe 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java @@ -89,6 +89,14 @@ public class ServicePluginFactory { private static ServicePluginFactory instance; + private static final String CUSTOM_RESOURCE_TP = "custom-resource-tp"; + private static final String VS_MONITORED = "VS_assured"; + private static final String VS_UNMONITORED = "VS_besteffort"; + private static final String TS_MONITORED = "TS1"; + private static final String TS_UNMONITORED = "TS2"; + private static final String CUSTOM_TP_LIST[] = + new String[] {VS_MONITORED, VS_UNMONITORED, TS_MONITORED, TS_UNMONITORED}; + static { try (InputStream is = ClassLoader.class.getResourceAsStream("/application.properties")) { Properties prop = new Properties(); @@ -351,13 +359,6 @@ public class ServicePluginFactory { return false; } - public static String CUSTOM_RESOURCE_TP = "custom-resource-tp"; - public static String VS_MONITORED = "VS_assured"; - public static String VS_UNMONITORED = "VS_besteffort"; - public static String TS_MONITORED = "TS1"; - public static String TS_UNMONITORED = "TS2"; - public static String CUSTOM_TP_LIST[] = new String[] {VS_MONITORED, VS_UNMONITORED, TS_MONITORED, TS_UNMONITORED}; - private void customizeTP(Map crossTps, String svcName, DelegateExecution execution) { Optional customType = Arrays.stream(CUSTOM_TP_LIST).filter(svcName::contains).findFirst(); if (customType.isPresent()) { -- cgit 1.2.3-korg