Bump MRI upstreams
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / sal / SalAsyncConfigServiceImpl.java
index 7ea34abc1729c203ba516278266666a8a68efa6a..bc9f7217c22beb16b0a90dfdc5b386d4af3fb793 100644 (file)
@@ -5,13 +5,11 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.services.sal;
 
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
-import java.util.Objects;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
 import org.opendaylight.openflowplugin.impl.services.singlelayer.SingleLayerGetAsyncConfigService;
@@ -32,19 +30,19 @@ public class SalAsyncConfigServiceImpl implements SalAsyncConfigService {
 
     public SalAsyncConfigServiceImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext) {
         setAsyncConfigService = new SingleLayerSetAsyncConfigService(requestContextStack, deviceContext);
-        this.getAsyncConfigService = new SingleLayerGetAsyncConfigService(requestContextStack, deviceContext);
+        getAsyncConfigService = new SingleLayerGetAsyncConfigService(requestContextStack, deviceContext);
     }
 
     @Override
-    public ListenableFuture<RpcResult<SetAsyncOutput>> setAsync(SetAsyncInput input) {
+    public ListenableFuture<RpcResult<SetAsyncOutput>> setAsync(final SetAsyncInput input) {
         return setAsyncConfigService.handleServiceCall(input);
     }
 
     @Override
-    public ListenableFuture<RpcResult<GetAsyncOutput>> getAsync(GetAsyncInput input) {
+    public ListenableFuture<RpcResult<GetAsyncOutput>> getAsync(final GetAsyncInput input) {
         return Futures.transform(getAsyncConfigService.handleServiceCall(input), result ->
-                Objects.nonNull(result) && result.isSuccessful()
-                        ? RpcResultBuilder.success(new GetAsyncOutputBuilder(result.getResult())).build()
+                result != null && result.isSuccessful()
+                        ? RpcResultBuilder.success(new GetAsyncOutputBuilder(result.getResult()).build()).build()
                         : RpcResultBuilder.<GetAsyncOutput>failed().build(),
                 MoreExecutors.directExecutor());
     }