summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/v3po2vpp/src/main')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java
index 9f788afc6..75554d4b7 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/interfacesstate/InterfaceDataTranslator.java
@@ -29,6 +29,7 @@ import java.math.BigInteger;
import java.util.Objects;
import java.util.stream.Collector;
import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev140508.EthernetCsmacd;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfaceType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
@@ -177,9 +178,13 @@ public interface InterfaceDataTranslator extends ByteDataTranslator, JvppReplyCo
return isInterfaceOfType(ifcType, vppInterfaceDetails);
}
- default boolean isInterfaceOfType(final Class<? extends InterfaceType> ifcType,
- final SwInterfaceDetails cachedDetails) {
- return ifcType.equals(getInterfaceType(toString(cachedDetails.interfaceName)));
+ default boolean isInterfaceOfType(@Nonnull final Class<? extends InterfaceType> ifcType,
+ @Nullable final SwInterfaceDetails cachedDetails) {
+ if (cachedDetails == null) {
+ return false;
+ } else {
+ return ifcType.equals(getInterfaceType(toString(cachedDetails.interfaceName)));
+ }
}
/**