Bump upstream SNAPSHOTS
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / VotingFuture.java
index b6aba31e50982bc47d679189ea3f017cad9e2724..f9fffea025bbcdbe3952ae28bfbf084e12364129 100644 (file)
@@ -14,7 +14,8 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 
 /**
  * An {@link AbstractFuture} implementation which requires a certain number of votes before it completes. If all votes
@@ -22,6 +23,7 @@ import javax.annotation.concurrent.GuardedBy;
  * an exception. This exception corresponds to the cause reported by the first 'no' vote, with all subsequent votes
  * added as suppressed exceptions.
  *
+ * <p>
  * Implementation is geared toward positive votes. Negative votes have to synchronize and therefore are more likely
  * to see contention.
  *
@@ -53,7 +55,7 @@ class VotingFuture<T> extends AbstractFuture<T> {
         if (castVote()) {
             synchronized (failures) {
                 resolveResult();
-             }
+            }
         }
     }
 
@@ -72,7 +74,7 @@ class VotingFuture<T> extends AbstractFuture<T> {
         return votes == 0;
     }
 
-    @GuardedBy("failures")
+    @Holding("failures")
     private void resolveResult() {
         final Iterator<Throwable> it = failures.iterator();
         if (!it.hasNext()) {