Remove Objects.{is,non}Null abuse
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / protocol / deserialization / match / Icmpv6CodeEntryDeserializer.java
index 6bc515e42aadb3c47309fa1fd7805052e9c458fd..6ba0a4183a584d1f01a8caea2a81acf969c04719 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.deserialization.match;
 
 import io.netty.buffer.ByteBuf;
-import java.util.Objects;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder;
 
@@ -20,11 +18,11 @@ public class Icmpv6CodeEntryDeserializer extends AbstractMatchEntryDeserializer
         processHeader(message);
         final short code = message.readUnsignedByte();
 
-        if (Objects.isNull(builder.getIcmpv6Match())) {
+        if (builder.getIcmpv6Match() == null) {
             builder.setIcmpv6Match(new Icmpv6MatchBuilder()
                     .setIcmpv6Code(code)
                     .build());
-        } else if (Objects.isNull(builder.getIcmpv6Match().getIcmpv6Code())) {
+        } else if (builder.getIcmpv6Match().getIcmpv6Code() == null) {
             builder.setIcmpv6Match(new Icmpv6MatchBuilder(builder.getIcmpv6Match())
                     .setIcmpv6Code(code)
                     .build());
@@ -32,5 +30,4 @@ public class Icmpv6CodeEntryDeserializer extends AbstractMatchEntryDeserializer
             throwErrorOnMalformed(builder, "icmpv6Match", "icmpv6Code");
         }
     }
-
 }