aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/java/org
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-05-09 12:41:43 -0700
committerGary Wu <gary.i.wu@huawei.com>2017-05-09 12:47:05 -0700
commita4ade73cdb768ee15bc8dd032904743f84326ee2 (patch)
treeb803590f1ccfe9b2588d70edd59ab462b7ed84c6 /bpmn/MSOInfrastructureBPMN/src/main/java/org
parentb1e5734ef566af5d49ba17d05ca0ab7b56d6666d (diff)
Refactor WorkflowAsyncResource
Change-Id: I794b606687343851f71d63ac055ed1898320216a Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/java/org')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java
index 09454f0..0cc81bf 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java
+++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/WorkflowAsyncInfrastructureResource.java
@@ -40,11 +40,7 @@ import org.openecomp.mso.bpmn.common.workflow.service.WorkflowAsyncResource;
@Path("/async")
public class WorkflowAsyncInfrastructureResource extends WorkflowAsyncResource {
- protected ProcessEngineServices getProcessEngineServices() {
- if (pes4junit == null) {
- return ProcessEngines.getProcessEngine("infrastructure");
- } else {
- return pes4junit;
- }
- }
+ protected ProcessEngineServices getProcessEngineServices() {
+ return pes4junit.orElse(ProcessEngines.getProcessEngine("infrastructure"));
+ }
}