sal-common-api: use lambdas
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / TransactionCommitDeadlockException.java
index 50952eaaf1ca90c89e02a5636e5d3594f0809252..99a92e58e6f525a6cb0680e3d683c392facc39ee 100644 (file)
@@ -30,12 +30,8 @@ public class TransactionCommitDeadlockException extends TransactionCommitFailedE
             "result must be obtained asynchronously, e.g. via Futures#addCallback, to avoid deadlock.";
     private static final RpcError DEADLOCK_RPCERROR = RpcResultBuilder.newError(ErrorType.APPLICATION, "lock-denied", DEADLOCK_MESSAGE);
 
-    public static final Supplier<Exception> DEADLOCK_EXCEPTION_SUPPLIER = new Supplier<Exception>() {
-        @Override
-        public Exception get() {
-            return new TransactionCommitDeadlockException(DEADLOCK_MESSAGE, DEADLOCK_RPCERROR);
-        }
-    };
+    public static final Supplier<Exception> DEADLOCK_EXCEPTION_SUPPLIER =
+            () -> new TransactionCommitDeadlockException(DEADLOCK_MESSAGE, DEADLOCK_RPCERROR);
 
     public TransactionCommitDeadlockException(final String message, final RpcError... errors) {
         super(message, errors);