diff options
author | 2018-03-08 17:05:43 +0800 | |
---|---|---|
committer | 2018-03-08 17:22:25 +0800 | |
commit | a67fa1649353379e53864b650b13ee1340aeea71 (patch) | |
tree | 1a87b6caefa6716080c76e0eab45b2a95a10c182 /sdc-workflow-designer-server/src/main/java | |
parent | 548e5f5ed2ad5a7c8ac29a6f5245c4779bb28f11 (diff) |
Fixed the bugs checked by sonar.
Add keyword 'final' to the public static member variables of classes.
Issue-ID: SDC-1079
Change-Id: If1e68e4fa5e5709c0a42095bceb7ab3bf97143ac
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-server/src/main/java')
6 files changed, 8 insertions, 8 deletions
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/config/Config.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/config/Config.java index 601822dd..91cd4983 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/config/Config.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/config/Config.java @@ -22,10 +22,10 @@ import org.slf4j.LoggerFactory; public class Config {
private static Logger log = LoggerFactory.getLogger(Config.class);
private static String configFilePath = "bpmn.config.properties";
- public static String HANDLER_ClASS = "handlerClass";
- public static String TEMPLATE_PATH = "templatePath";
+ public final static String HANDLER_ClASS = "handlerClass";
+ public final static String TEMPLATE_PATH = "templatePath";
- public static Properties PROPERTIES = load();
+ public final static Properties PROPERTIES = load();
public static Properties load() {
Properties properties = new Properties();
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/EndEvent.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/EndEvent.java index 52818e74..c25e623e 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/EndEvent.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/EndEvent.java @@ -12,5 +12,5 @@ package org.onap.sdc.workflowdesigner.model;
public class EndEvent extends Element {
- public static String type = "endEvent";
+ public final static String TYPE = "endEvent";
}
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ExclusiveGateway.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ExclusiveGateway.java index eb0f4bba..77bc28c0 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ExclusiveGateway.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ExclusiveGateway.java @@ -12,5 +12,5 @@ package org.onap.sdc.workflowdesigner.model;
public class ExclusiveGateway extends Element {
- public static String type = "exclusiveGateway";
+ public final static String TYPE = "exclusiveGateway";
}
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ParallelGateway.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ParallelGateway.java index 93fae505..b56aa33d 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ParallelGateway.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/ParallelGateway.java @@ -12,5 +12,5 @@ package org.onap.sdc.workflowdesigner.model;
public class ParallelGateway extends Element {
- public static String type = "parallelGateway";
+ public final static String TYPE = "parallelGateway";
}
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/RestServiceTask.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/RestServiceTask.java index 6110132e..173c4da5 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/RestServiceTask.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/model/RestServiceTask.java @@ -16,7 +16,7 @@ import java.util.List; import org.onap.sdc.workflowdesigner.config.Config;
public class RestServiceTask extends ServiceTask {
- public static String handler = Config.PROPERTIES.getProperty(Config.HANDLER_ClASS);
+ private static String handler = Config.PROPERTIES.getProperty(Config.HANDLER_ClASS);
private String restConfigId;
public String getRestConfigId() {
diff --git a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java index ee6a6e57..89e0c8c9 100644 --- a/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java +++ b/sdc-workflow-designer-server/src/main/java/org/onap/sdc/workflowdesigner/writer/BpmnPlanArtefactWriter.java @@ -28,7 +28,7 @@ public class BpmnPlanArtefactWriter { private Process process;
- public static String TEMPLATE_PATH = Config.PROPERTIES.getProperty(Config.TEMPLATE_PATH);
+ private final static String TEMPLATE_PATH = Config.PROPERTIES.getProperty(Config.TEMPLATE_PATH);
private static Logger log = LoggerFactory.getLogger(BpmnPlanArtefactWriter.class);
|