Get rid of JSR305 annotations
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / state / BGPPeerStateImpl.java
index 12d2c441cf8d9c1b8f273aadc3bb55889c96e18d..66743f7ccb4437b4e69fd1eea58eccec652fe2ae 100644 (file)
@@ -5,7 +5,6 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.protocol.bgp.rib.impl.state;
 
 import static java.util.Objects.requireNonNull;
@@ -18,9 +17,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.atomic.LongAdder;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.protocol.bgp.rib.DefaultRibReference;
 import org.opendaylight.protocol.bgp.rib.impl.spi.BGPMessagesListener;
 import org.opendaylight.protocol.bgp.rib.impl.state.peer.PrefixesInstalledCounters;
@@ -75,11 +74,11 @@ public abstract class BGPPeerStateImpl extends DefaultRibReference implements BG
     @GuardedBy("this")
     private boolean peerRestarting;
 
-    public BGPPeerStateImpl(@Nonnull final KeyedInstanceIdentifier<Rib, RibKey> instanceIdentifier,
-        @Nullable final String groupId, @Nonnull final IpAddress neighborAddress,
-        @Nonnull final Set<TablesKey> afiSafisAdvertized,
-        @Nonnull final Set<TablesKey> afiSafisGracefulAdvertized,
-        @Nonnull final Map<TablesKey, Integer> afiSafisLlGracefulAdvertized) {
+    public BGPPeerStateImpl(final @NonNull KeyedInstanceIdentifier<Rib, RibKey> instanceIdentifier,
+            final @Nullable String groupId, final @NonNull IpAddress neighborAddress,
+            final @NonNull Set<TablesKey> afiSafisAdvertized,
+            final @NonNull Set<TablesKey> afiSafisGracefulAdvertized,
+            final @NonNull Map<TablesKey, Integer> afiSafisLlGracefulAdvertized) {
         super(instanceIdentifier);
         this.neighborAddress = requireNonNull(neighborAddress);
         this.groupId = groupId;
@@ -131,7 +130,7 @@ public abstract class BGPPeerStateImpl extends DefaultRibReference implements BG
     }
 
     @Override
-    public final synchronized long getPrefixesSentCount(@Nonnull final TablesKey tablesKey) {
+    public final synchronized long getPrefixesSentCount(final TablesKey tablesKey) {
         if (this.prefixesSent == null) {
             return 0;
         }
@@ -188,11 +187,11 @@ public abstract class BGPPeerStateImpl extends DefaultRibReference implements BG
         return this.peerRestarting;
     }
 
-    public final synchronized void setAfiSafiGracefulRestartState(final int peerRestartTime,
-            final boolean peerRestarting, final boolean localRestarting) {
-        this.peerRestartTime = peerRestartTime;
-        this.peerRestarting = peerRestarting;
-        this.localRestarting = localRestarting;
+    public final synchronized void setAfiSafiGracefulRestartState(final int newPeerRestartTime,
+            final boolean newPeerRestarting, final boolean newLocalRestarting) {
+        this.peerRestartTime = newPeerRestartTime;
+        this.peerRestarting = newPeerRestarting;
+        this.localRestarting = newLocalRestarting;
     }
 
     protected final synchronized void setAdvertizedGracefulRestartTableTypes(final List<TablesKey> receivedGraceful) {
@@ -205,10 +204,11 @@ public abstract class BGPPeerStateImpl extends DefaultRibReference implements BG
         this.prefixesSent.put(tablesKey, prefixesSentCounter);
     }
 
-    protected final synchronized void registerPrefixesCounters(@Nonnull final PrefixesReceivedCounters prefixesReceived,
-        @Nonnull final PrefixesInstalledCounters prefixesInstalled) {
-        this.prefixesReceived = prefixesReceived;
-        this.prefixesInstalled = prefixesInstalled;
+    protected final synchronized void registerPrefixesCounters(
+            final @NonNull PrefixesReceivedCounters newPrefixesReceived,
+            final @NonNull PrefixesInstalledCounters newPrefixesInstalled) {
+        this.prefixesReceived = newPrefixesReceived;
+        this.prefixesInstalled = newPrefixesInstalled;
     }
 
     protected final synchronized void resetState() {
@@ -311,7 +311,7 @@ public abstract class BGPPeerStateImpl extends DefaultRibReference implements BG
     }
 
     @Override
-    public final synchronized int getLlGracefulRestartTimer(@Nonnull final TablesKey tablesKey) {
+    public final synchronized int getLlGracefulRestartTimer(final TablesKey tablesKey) {
         final int timerAdvertised = isLlGracefulRestartAdvertised(tablesKey)
                 ? this.afiSafisLlGracefulAdvertised.get(tablesKey) : 0;
         final int timerReceived = isLlGracefulRestartReceived(tablesKey)