Expand Identifiable documentation
[yangtools.git] / common / concepts / src / main / java / org / opendaylight / yangtools / concepts / AbstractRegistration.java
index f5016e391c7ae38da25849ab924417ba96c26807..c07b38b3ff7515ba064ff63d1701e537616b4a11 100644 (file)
@@ -18,8 +18,6 @@ import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
 public abstract class AbstractRegistration implements AutoCloseable {
     private static final AtomicIntegerFieldUpdater<AbstractRegistration> CLOSED_UPDATER =
             AtomicIntegerFieldUpdater.newUpdater(AbstractRegistration.class, "closed");
-
-    @SuppressWarnings("unused") // updated by CLOSED_UPDATER
     private volatile int closed = 0;
 
     /**
@@ -36,7 +34,7 @@ public abstract class AbstractRegistration implements AutoCloseable {
      * @return true if the registration was closed, false otherwise.
      */
     protected final boolean isClosed() {
-        return CLOSED_UPDATER.get(this) != 0;
+        return closed != 0;
     }
 
     @Override