Remove Objects.{is,non}Null abuse
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / protocol / serialization / match / Ipv6LabelEntrySerializer.java
index c2886f76958d5c91892fb84bb405c127dcd7097f..a07902cdf7c3448d15f1628fa206bf9bd56cd4be 100644 (file)
@@ -5,11 +5,9 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.openflowplugin.impl.protocol.serialization.match;
 
 import io.netty.buffer.ByteBuf;
-import java.util.Objects;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
 import org.opendaylight.openflowplugin.openflow.md.util.ByteUtil;
@@ -35,14 +33,14 @@ public class Ipv6LabelEntrySerializer extends AbstractMatchEntrySerializer {
 
     @Override
     public boolean matchTypeCheck(Match match) {
-        return Objects.nonNull(match.getLayer3Match())
+        return match.getLayer3Match() != null
                 && match.getLayer3Match() instanceof Ipv6Match
-                && Objects.nonNull(((Ipv6Match) match.getLayer3Match()).getIpv6Label());
+                && ((Ipv6Match) match.getLayer3Match()).getIpv6Label() != null;
     }
 
     @Override
     protected boolean getHasMask(Match match) {
-        return Objects.nonNull(((Ipv6Match) match.getLayer3Match()).getIpv6Label().getFlabelMask());
+        return ((Ipv6Match) match.getLayer3Match()).getIpv6Label().getFlabelMask() != null;
     }
 
     @Override
@@ -59,5 +57,4 @@ public class Ipv6LabelEntrySerializer extends AbstractMatchEntrySerializer {
     protected int getValueLength() {
         return EncodeConstants.SIZE_OF_INT_IN_BYTES;
     }
-
 }