From a4ade73cdb768ee15bc8dd032904743f84326ee2 Mon Sep 17 00:00:00 2001 From: Gary Wu Date: Tue, 9 May 2017 12:41:43 -0700 Subject: Refactor WorkflowAsyncResource Change-Id: I794b606687343851f71d63ac055ed1898320216a Signed-off-by: Gary Wu --- .../workflow/service/WorkflowAsyncInfrastructureResource.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN') 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 09454f0876..0cc81bf0c6 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")); + } } -- cgit 1.2.3-korg