Bump upstreams
[openflowplugin.git] / test-provider / src / main / java / org / opendaylight / openflowplugin / test / OpenflowpluginTestServiceProvider.java
index ba4033d316c755c46ef8433ef4d093f9ce0da255..00d76392440e6d1757d55720eafdbcb0ba22f9b9 100644 (file)
@@ -30,18 +30,16 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class OpenflowpluginTestServiceProvider implements AutoCloseable,
-        SalFlowService {
-
-    private static final Logger LOG = LoggerFactory
-            .getLogger(OpenflowpluginTestServiceProvider.class);
+public class OpenflowpluginTestServiceProvider implements AutoCloseable, SalFlowService {
+    private static final Logger LOG = LoggerFactory.getLogger(OpenflowpluginTestServiceProvider.class);
 
     private final DataBroker dataService;
-    private ObjectRegistration<SalFlowService> flowRegistration;
     private final NotificationPublishService notificationProviderService;
 
-    public OpenflowpluginTestServiceProvider(DataBroker dataService,
-            NotificationPublishService notificationProviderService) {
+    private ObjectRegistration<SalFlowService> flowRegistration = null;
+
+    public OpenflowpluginTestServiceProvider(final DataBroker dataService,
+            final NotificationPublishService notificationProviderService) {
         this.dataService = dataService;
         this.notificationProviderService = notificationProviderService;
     }
@@ -102,7 +100,7 @@ public class OpenflowpluginTestServiceProvider implements AutoCloseable,
      * service.rev130819.AddFlowInput)
      */
     @Override
-    public ListenableFuture<RpcResult<AddFlowOutput>> addFlow(AddFlowInput input) {
+    public ListenableFuture<RpcResult<AddFlowOutput>> addFlow(final AddFlowInput input) {
         OpenflowpluginTestServiceProvider.LOG.info("addFlow - {}", input);
         return null;
     }
@@ -117,7 +115,7 @@ public class OpenflowpluginTestServiceProvider implements AutoCloseable,
      * .service.rev130819.RemoveFlowInput)
      */
     @Override
-    public ListenableFuture<RpcResult<RemoveFlowOutput>> removeFlow(RemoveFlowInput input) {
+    public ListenableFuture<RpcResult<RemoveFlowOutput>> removeFlow(final RemoveFlowInput input) {
         OpenflowpluginTestServiceProvider.LOG.info("removeFlow - {}", input);
         return null;
     }
@@ -132,17 +130,17 @@ public class OpenflowpluginTestServiceProvider implements AutoCloseable,
      * .service.rev130819.UpdateFlowInput)
      */
     @Override
-    public ListenableFuture<RpcResult<UpdateFlowOutput>> updateFlow(UpdateFlowInput input) {
+    public ListenableFuture<RpcResult<UpdateFlowOutput>> updateFlow(final UpdateFlowInput input) {
         OpenflowpluginTestServiceProvider.LOG.info("updateFlow - {}", input);
         return null;
     }
 
-    public ObjectRegistration<OpenflowpluginTestServiceProvider> register(RpcProviderService rpcRegistry) {
+    public ObjectRegistration<OpenflowpluginTestServiceProvider> register(final RpcProviderService rpcRegistry) {
         setFlowRegistration(rpcRegistry.registerRpcImplementation(SalFlowService.class, this, ImmutableSet.of(
             InstanceIdentifier.create(Nodes.class)
             .child(Node.class, new NodeKey(new NodeId(OpenflowpluginTestActivator.NODE_ID))))));
 
-        return new AbstractObjectRegistration<OpenflowpluginTestServiceProvider>(this) {
+        return new AbstractObjectRegistration<>(this) {
             @Override
             protected void removeRegistration() {
                 flowRegistration.close();