Update MRI upstreams for Phosphorus
[openflowplugin.git] / test-provider / src / main / java / org / opendaylight / openflowplugin / test / OpenflowpluginTestCommandProvider.java
index 27f4fc7df0eb88fa28495504bd3a702e47781f16..eff31def559976228cf1d0214b66b29fca5d30b4 100644 (file)
@@ -2133,28 +2133,19 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider {
     }
 
     private static MatchBuilder createICMPv6Match1() {
-
-        final MatchBuilder match = new MatchBuilder();
-        final EthernetMatchBuilder eth = new EthernetMatchBuilder();
-        final EthernetTypeBuilder ethTypeBuilder = new EthernetTypeBuilder();
-        ethTypeBuilder.setType(new EtherType(Uint32.valueOf(0x86dd)));
-        eth.setEthernetType(ethTypeBuilder.build());
-        match.setEthernetMatch(eth.build());
-
-        // ipv4 version
-        final IpMatchBuilder ipmatch = new IpMatchBuilder();
-        ipmatch.setIpProtocol((short) 256);
-        match.setIpMatch(ipmatch.build());
-
-        // icmpv6
-        final Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder();
-
-        // match
-        icmpv6match.setIcmpv6Type(Uint8.valueOf(135));
-        icmpv6match.setIcmpv6Code(Uint8.ONE);
-        match.setIcmpv6Match(icmpv6match.build());
-
-        return match;
+        return new MatchBuilder()
+            .setEthernetMatch(new EthernetMatchBuilder()
+                .setEthernetType(new EthernetTypeBuilder()
+                    .setType(new EtherType(Uint32.valueOf(0x86dd)))
+                    .build())
+                .build())
+            // ipv4 version
+            .setIpMatch(new IpMatchBuilder().setIpProtocol(Uint8.MAX_VALUE).build())
+            // icmpv6
+            .setIcmpv6Match(new Icmpv6MatchBuilder()
+                .setIcmpv6Type(Uint8.valueOf(135))
+                .setIcmpv6Code(Uint8.ONE)
+                .build());
     }
 
     private static MatchBuilder createMatch33() {