Reduce JSR305 proliferation
[controller.git] / opendaylight / md-sal / sal-common-api / src / main / java / org / opendaylight / controller / md / sal / common / api / data / AsyncWriteTransaction.java
index 852c4e488617a25ef339dc4d58da6d03c4101fad..70789ccb1481c36e8179999d341a0bdddecd47b8 100644 (file)
@@ -11,10 +11,9 @@ import com.google.common.util.concurrent.CheckedFuture;
 import com.google.common.util.concurrent.FluentFuture;
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.MoreExecutors;
-import javax.annotation.CheckReturnValue;
 import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.controller.md.sal.common.api.MappingCheckedFuture;
 import org.opendaylight.mdsal.common.api.CommitInfo;
-import org.opendaylight.mdsal.common.api.MappingCheckedFuture;
 import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.util.concurrent.ExceptionMapper;
 
@@ -339,7 +338,6 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * @deprecated Use {@link #commit()} instead.
      */
     @Deprecated
-    @CheckReturnValue
     default CheckedFuture<Void, TransactionCommitFailedException> submit() {
         return MappingCheckedFuture.create(commit().transform(ignored -> null, MoreExecutors.directExecutor()),
                 SUBMIT_EXCEPTION_MAPPER);
@@ -374,7 +372,6 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      *         {@link TransactionCommitFailedException} or an exception derived from TransactionCommitFailedException.
      * @throws IllegalStateException if the transaction is already committed or was canceled.
      */
-    @CheckReturnValue
     @NonNull FluentFuture<? extends @NonNull CommitInfo> commit();
 
     /**
@@ -384,7 +381,7 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
     ExceptionMapper<TransactionCommitFailedException> SUBMIT_EXCEPTION_MAPPER =
         new ExceptionMapper<TransactionCommitFailedException>("submit", TransactionCommitFailedException.class) {
             @Override
-            protected TransactionCommitFailedException newWithCause(String message, Throwable cause) {
+            protected TransactionCommitFailedException newWithCause(final String message, final Throwable cause) {
                 return new TransactionCommitFailedException(message, cause);
             }
         };