Fix findbugs violations in netconf
[netconf.git] / netconf / sal-netconf-connector / src / main / java / org / opendaylight / netconf / sal / connect / netconf / sal / NetconfDeviceRpc.java
index 1b5ae10ec4955b74ecc5660a6ff19deb0cab45ca..897cdaa5c73267039b1438aed9054cb69c37b9d9 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.netconf.sal.connect.netconf.sal;
 
-import com.google.common.base.Function;
 import com.google.common.collect.Collections2;
 import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.Futures;
@@ -68,13 +67,8 @@ public final class NetconfDeviceRpc implements DOMRpcService {
                 }
             }, MoreExecutors.directExecutor());
 
-        return Futures.makeChecked(transformed, new Function<Exception, DOMRpcException>() {
-            @Nullable
-            @Override
-            public DOMRpcException apply(@Nullable final Exception exception) {
-                return new DOMRpcImplementationNotAvailableException(exception, "Unable to invoke rpc %s", type);
-            }
-        });
+        return Futures.makeChecked(transformed, exception ->
+            new DOMRpcImplementationNotAvailableException(exception, "Unable to invoke rpc %s", type));
     }
 
     @Nonnull