X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fprotocol%2Fdeserialization%2Fmatch%2FIpv6DestinationEntryDeserializer.java;h=e902d9f94a1cff0aff358f67c588ed96d75a1995;hb=3e68fd46f080d620be54dbf1965d0afb9433b7a0;hp=06c13072c4b4257daff9cafb204de3b0aa883487;hpb=82bef84fdf57d1f9491534a7fa4ecfaf696d22df;p=openflowplugin.git diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/Ipv6DestinationEntryDeserializer.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/Ipv6DestinationEntryDeserializer.java index 06c13072c4..e902d9f94a 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/Ipv6DestinationEntryDeserializer.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/match/Ipv6DestinationEntryDeserializer.java @@ -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.openflowjava.protocol.api.util.EncodeConstants; import org.opendaylight.openflowjava.protocol.impl.deserialization.match.OxmDeserializerHelper; import org.opendaylight.openflowjava.util.ByteBufUtils; @@ -43,12 +41,12 @@ public class Ipv6DestinationEntryDeserializer extends AbstractMatchEntryDeserial } private static void setPrefixMatch(final MatchBuilder builder, final Ipv6Address address, final byte[] mask) { - if (Objects.isNull(builder.getLayer3Match())) { + if (builder.getLayer3Match() == null) { builder.setLayer3Match(new Ipv6MatchBuilder() .setIpv6Destination(IpConversionUtil.createPrefix(address, mask)) .build()); } else if (builder.getLayer3Match() instanceof Ipv6Match - && Objects.isNull(((Ipv6Match) builder.getLayer3Match()).getIpv6Destination())) { + && ((Ipv6Match) builder.getLayer3Match()).getIpv6Destination() == null) { builder.setLayer3Match(new Ipv6MatchBuilder((Ipv6Match) builder.getLayer3Match()) .setIpv6Destination(IpConversionUtil.createPrefix(address, mask)) .build()); @@ -57,16 +55,14 @@ public class Ipv6DestinationEntryDeserializer extends AbstractMatchEntryDeserial } } - private static void setArbitraryMatch(final MatchBuilder builder, final Ipv6Address address, - final byte[] mask) { - if (Objects.isNull(builder.getLayer3Match())) { + private static void setArbitraryMatch(final MatchBuilder builder, final Ipv6Address address, final byte[] mask) { + if (builder.getLayer3Match() == null) { builder.setLayer3Match(new Ipv6MatchArbitraryBitMaskBuilder() .setIpv6DestinationAddressNoMask(address) .setIpv6DestinationArbitraryBitmask(IpConversionUtil.createIpv6ArbitraryBitMask(mask)) .build()); } else if (builder.getLayer3Match() instanceof Ipv6MatchArbitraryBitMask - && Objects.isNull(((Ipv6MatchArbitraryBitMask) builder.getLayer3Match()) - .getIpv6DestinationAddressNoMask())) { + && ((Ipv6MatchArbitraryBitMask) builder.getLayer3Match()).getIpv6DestinationAddressNoMask() == null) { final Ipv6MatchArbitraryBitMask match = (Ipv6MatchArbitraryBitMask) builder.getLayer3Match(); builder.setLayer3Match(new Ipv6MatchArbitraryBitMaskBuilder(match) .setIpv6DestinationAddressNoMask(address) @@ -76,5 +72,4 @@ public class Ipv6DestinationEntryDeserializer extends AbstractMatchEntryDeserial throwErrorOnMalformed(builder, "layer3Match", "ipv6DestinationAddressNoMask"); } } - }