This is just a tiny adjustment of a Precondition, which should have been
triggered before this access. isPresent() returns true/false, which will
be autoboxed, so will always pass checkNotNull. use checkArgument()
instead, which will ensure that isPresent() == true.
Change-Id: I53fe6913c7a0f8073a193bc76c0792059c26fe2a
Signed-off-by: Robert Varga <rovarga@cisco.com>
package org.opendaylight.controller.sal.connector.remoterpc;
-import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Preconditions.checkState;
import java.util.Collection;
import java.util.Collections;
Optional<RoutingTable<RpcRouter.RouteIdentifier, String>> routingTable =
routingTableProvider.getRoutingTable();
- checkNotNull(routingTable.isPresent(), "Routing table is null");
+ checkState(routingTable.isPresent(), "Routing table is null");
return routingTable.get();
}