Fix findbugs violations in openflowplugin-impl
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / protocol / serialization / multipart / tablefeatures / WildcardsTablePropertySerializer.java
index 500d89f67cbb217467978f37bf7f227519aa6d98..f7f24aa1de9071969dc187e79fb39cf9a07c0421 100644 (file)
@@ -8,6 +8,7 @@
 
 package org.opendaylight.openflowplugin.impl.protocol.serialization.multipart.tablefeatures;
 
+import com.google.common.base.Preconditions;
 import io.netty.buffer.ByteBuf;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFSerializer;
 import org.opendaylight.openflowjava.protocol.api.extensibility.SerializerRegistry;
@@ -29,7 +30,7 @@ public class WildcardsTablePropertySerializer extends AbstractTablePropertySeria
         property
             .getWildcardSetfield()
             .getSetFieldMatch()
-            .forEach(setFieldMatch -> registry
+            .forEach(setFieldMatch -> Preconditions.checkNotNull(registry)
                 .<MatchField, OFSerializer<SetFieldMatch>>getSerializer(
                     new MessageTypeKey<>(
                         EncodeConstants.OF13_VERSION_ID,