Replace Preconditions.CheckNotNull per RequireNonNull
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / BGPSynchronization.java
index 8c311942fc265371417dc390911cda8e4c91f89a..5e13956fc174a2e007b7273c3e97ea5b022cc7e3 100644 (file)
@@ -7,8 +7,9 @@
  */
 package org.opendaylight.protocol.bgp.rib.impl;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Preconditions;
 import com.google.common.collect.Maps;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -61,7 +62,7 @@ public class BGPSynchronization {
     private final BGPSessionListener listener;
 
     public BGPSynchronization(final BGPSessionListener listener, final Set<TablesKey> types) {
-        this.listener = Preconditions.checkNotNull(listener);
+        this.listener = requireNonNull(listener);
 
         for (final TablesKey type : types) {
             this.syncStorage.put(type, new SyncVariables());
@@ -101,6 +102,10 @@ public class BGPSynchronization {
                 isEOR = true;
             }
         }
+        syncType(type, isEOR);
+    }
+
+    private void syncType(final TablesKey type, final boolean isEOR) {
         final SyncVariables s = this.syncStorage.get(type);
         if (s == null) {
             LOG.warn("BGPTableType was not present in open message : {}", type);