*/
package org.opendaylight.lispflowmapping.lisp.util;
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
import org.opendaylight.lispflowmapping.lisp.util.LispAddressStringifier.Destination;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.lisp.address.types.rev151105.SimpleAddress;
}
public static String getString(Destination dst, SimpleAddress addr) {
- Preconditions.checkNotNull(addr, "address should not be null");
+ requireNonNull(addr, "address should not be null");
if (addr.getIpAddress() != null) {
if (addr.getIpAddress().getIpv4Address() != null) {
} else if (addr.getMacAddress() != null) {
return addr.getMacAddress().getValue();
} else if (addr.getDistinguishedNameType() != null) {
- return (addr.getDistinguishedNameType().getValue());
+ return addr.getDistinguishedNameType().getValue();
} else if (addr.getAsNumber() != null) {
return "AS" + addr.getAsNumber().getValue();
}
}
protected static String getURLPrefix(SimpleAddress addr) {
- Preconditions.checkNotNull(addr, "address should not be null");
+ requireNonNull(addr, "address should not be null");
if (addr.getIpAddress() != null) {
if (addr.getIpAddress().getIpv4Address() != null) {