*/
package org.opendaylight.protocol.bgp.rib.impl.stats.peer.route;
+import static java.util.Objects.requireNonNull;
+
import com.google.common.base.Preconditions;
import java.util.Map;
import java.util.Set;
}
public final synchronized LongAdder init(@Nonnull final TablesKey tablesKey) {
- LongAdder counter = this.counters.get(Preconditions.checkNotNull(tablesKey));
+ LongAdder counter = this.counters.get(requireNonNull(tablesKey));
if (counter == null) {
counter = new LongAdder();
this.counters.put(tablesKey, counter);
* @param tablesKey
*/
@Nonnull public final LongAdder getCounterOrDefault(@Nonnull final TablesKey tablesKey) {
- return this.counters.getOrDefault(Preconditions.checkNotNull(tablesKey), new LongAdder());
+ return this.counters.getOrDefault(requireNonNull(tablesKey), new LongAdder());
}
/**
return init(tablesKey);
}
- return this.counters.get(Preconditions.checkNotNull(tablesKey));
+ return this.counters.get(requireNonNull(tablesKey));
}
public final Map<TablesKey, LongAdder> getCounters() {