aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-04-26 06:18:46 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-26 06:18:46 +0000
commit0d9e2a9146bc306afe6e6a87381b9f95adae2d78 (patch)
tree75b0c94749fc24879a1787f4e976d4390dce7a43
parentf677f922e672d1e9bab0ae55e4ce7ee814680554 (diff)
parentc4016246908618ec75064ef102dd0cbd285ec44d (diff)
Merge "Removed unused imports and rearranged variables Removed unused imports and moved variables to comply with Java Code Conventions. Issue-ID: SO-1490"
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java9
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java17
2 files changed, 13 insertions, 13 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
index a3f5253765..6f8d34e760 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
@@ -40,6 +40,7 @@ import org.slf4j.LoggerFactory;
*/
public class ResponseBuilder implements java.io.Serializable {
private static final long serialVersionUID = 1L;
+ private static final String WORKFLOWEXCEPTION = "WorkflowException";
private static final Logger logger = LoggerFactory.getLogger(ResponseBuilder.class);
/**
@@ -61,7 +62,7 @@ public class ResponseBuilder implements java.io.Serializable {
logger.debug("processKey=" + processKey);
// See if there"s already a WorkflowException object in the execution.
- WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
+ WorkflowException theException = (WorkflowException) execution.getVariable(WORKFLOWEXCEPTION);
if (theException != null) {
logger.debug("Exited " + method + " - propagated " + theException);
@@ -138,7 +139,7 @@ public class ResponseBuilder implements java.io.Serializable {
// Create a new WorkflowException object
theException = new WorkflowException(processKey, intResponseCode, errorResponse);
- execution.setVariable("WorkflowException", theException);
+ execution.setVariable(WORKFLOWEXCEPTION, theException);
logger.debug("Exited " + method + " - created " + theException);
return theException;
}
@@ -163,7 +164,7 @@ public class ResponseBuilder implements java.io.Serializable {
Object theResponse = null;
- WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
+ WorkflowException theException = (WorkflowException) execution.getVariable(WORKFLOWEXCEPTION);
String errorResponse = trimString(execution.getVariable(prefix + "ErrorResponse"), null);
String responseCode = trimString(execution.getVariable(prefix + "ResponseCode"), null);
@@ -222,7 +223,7 @@ public class ResponseBuilder implements java.io.Serializable {
}
String s = String.valueOf(object).trim();
- return s.equals("") ? emptyStringValue : s;
+ return "".equals(s) ? emptyStringValue : s;
}
/**
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
index 841eaee675..c37b77d332 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
@@ -22,7 +22,6 @@ package org.onap.so.bpmn.core.domain;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
/**
@@ -35,14 +34,6 @@ public class AllottedResource extends Resource {
private static final long serialVersionUID = 1L;
/*
- * set resourceType for this object
- */
- public AllottedResource() {
- resourceType = ResourceType.ALLOTTED_RESOURCE;
- setResourceId(UUID.randomUUID().toString());
- }
-
- /*
* fields specific to Allotted Resource resource type
*/
private String allottedResourceType;
@@ -60,6 +51,14 @@ public class AllottedResource extends Resource {
private String resourceInput;
/*
+ * set resourceType for this object
+ */
+ public AllottedResource() {
+ resourceType = ResourceType.ALLOTTED_RESOURCE;
+ setResourceId(UUID.randomUUID().toString());
+ }
+
+ /*
* GET and SET
*/
public String getAllottedResourceType() {