From c7d0075d223eab9f89fd28853c4b138792059be9 Mon Sep 17 00:00:00 2001 From: Patrick Brady Date: Thu, 1 Jun 2017 10:45:37 -0700 Subject: Merge of new rebased code Change-Id: I9b8d1f69eb3e0af1935ed8304fea4bf54c1aac47 Signed-off-by: Patrick Brady --- .../executionqueue/impl/ExecutionQueueServiceFactory.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main') diff --git a/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java b/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java index 01e4358e9..29de597b1 100644 --- a/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java +++ b/appc-dispatcher/appc-dispatcher-common/execution-queue-management-lib/src/main/java/org/openecomp/appc/executionqueue/impl/ExecutionQueueServiceFactory.java @@ -25,16 +25,11 @@ import org.openecomp.appc.executionqueue.ExecutionQueueService; public class ExecutionQueueServiceFactory { - private static ExecutionQueueService executionQueueService =null; - - public static ExecutionQueueService getExecutionQueueService(){ - if(executionQueueService == null){ - synchronized (ExecutionQueueServiceFactory.class){ - if(executionQueueService == null) - executionQueueService = new ExecutionQueueServiceImpl(); - } - } - return executionQueueService; + private static class ExecutionQueueServiceHolder { + public static final ExecutionQueueService executionQueueService = new ExecutionQueueServiceImpl(); } + public static ExecutionQueueService getExecutionQueueService() { + return ExecutionQueueServiceHolder.executionQueueService; + } } -- cgit 1.2.3-korg