Vulnerability fixes in ServicePluginFactory 90/92190/1
authorr.bogacki <r.bogacki@samsung.com>
Mon, 29 Jul 2019 11:15:40 +0000 (13:15 +0200)
committerr.bogacki <r.bogacki@samsung.com>
Mon, 29 Jul 2019 11:16:27 +0000 (13:16 +0200)
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

bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/workflow/service/ServicePluginFactory.java

index 95be6ba..1516f28 100644 (file)
@@ -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()) {