From 2abee725ffc9ee2ade4baaf0f5295b0ec0602fbe Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Mon, 18 May 2015 11:09:29 +0200 Subject: [PATCH] Introduce a shared successful RpcResult Also fix message counters in PacketProcessing. Change-Id: I7a270efa50a88dc430691002031d4079e3e369bf Signed-off-by: Robert Varga --- .../openflowplugin/impl/services/CommonService.java | 1 + .../openflowplugin/impl/services/SalFlowServiceImpl.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java index 0195238761..aa28370282 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/CommonService.java @@ -24,6 +24,7 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder; import org.slf4j.Logger; public abstract class CommonService { + protected static final RpcResult SUCCESSFUL_RPCRESULT = RpcResultBuilder.success().build(); private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(CommonService.class); private static final long WAIT_TIME = 2000; private static final BigInteger PRIMARY_CONNECTION = BigInteger.ZERO; diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java index 3f8e51fde2..9872b2252c 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/SalFlowServiceImpl.java @@ -238,7 +238,7 @@ public class SalFlowServiceImpl extends CommonService implements SalFlowService RequestContextUtil.closeRequstContext(requestContext); getMessageSpy().spyMessage(FlowModInput.class, MessageSpy.STATISTIC_GROUP.TO_SWITCH_SUBMIT_SUCCESS); - settableFuture.set(RpcResultBuilder.success().build()); + settableFuture.set(SUCCESSFUL_RPCRESULT); } @Override -- 2.36.6