diff options
author | r.bogacki <r.bogacki@samsung.com> | 2019-07-29 13:15:40 +0200 |
---|---|---|
committer | r.bogacki <r.bogacki@samsung.com> | 2019-07-29 13:16:27 +0200 |
commit | ed1ab977f02bff4dbbb931cceb8ac9ac676fcd3f (patch) | |
tree | 3b0577cc74ca4f2d37d53878d03ba01f16fe3579 | |
parent | f5a69be34850dc102c02514a8126e79f00226fa6 (diff) |
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 <r.bogacki@samsung.com>
Change-Id: Iabaca0bd138b5dee22c95a4a0cc6cb5ebe442fd2
-rw-r--r-- | bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java | 15 |
1 files changed, 8 insertions, 7 deletions
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<String, Object> crossTps, String svcName, DelegateExecution execution) { Optional<String> customType = Arrays.stream(CUSTOM_TP_LIST).filter(svcName::contains).findFirst(); if (customType.isPresent()) { |