From a082e5e88c4cd00305ee3deb32a6c6b843af0f21 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Sun, 22 Mar 2015 15:03:48 +0100 Subject: [PATCH] Do not instantiate Long/Short/Integer This patch removes explicit instantiation in favor of letting the JVM decide what to do. Also use valueOf() where needed and finish the BigInteger instantiation cleanup. Change-Id: I8325679ea3fb023f39cb4814040d1f535eeecc95 Signed-off-by: Robert Varga Signed-off-by: Michal Rehak --- .../FromSalConversionsUtils.java | 6 ++-- .../compatibility/ToSalConversionsUtils.java | 2 +- .../core/sal/convertor/ActionConvertor.java | 2 +- .../openflow/md/util/OpenflowPortsUtil.java | 18 +++++----- ...lowPluginBulkGroupTransactionProvider.java | 20 +++++------ ...OpenflowPluginBulkTransactionProvider.java | 16 ++++----- ...penflowpluginGroupTestCommandProvider.java | 12 +++---- ...luginTableFeaturesTestCommandProvider.java | 8 ++--- .../OpenflowpluginTestCommandProvider.java | 36 +++++++++---------- 9 files changed, 59 insertions(+), 61 deletions(-) diff --git a/legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/FromSalConversionsUtils.java b/legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/FromSalConversionsUtils.java index 7c29979256..f7ea9c0c19 100644 --- a/legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/FromSalConversionsUtils.java +++ b/legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/FromSalConversionsUtils.java @@ -198,8 +198,7 @@ public final class FromSalConversionsUtils { MatchField transportPort = sourceMatch.getField(matchType); if (transportPort != null && transportPort.getValue() != null && transportPort.getValue().getClass().equals(Short.class)) { - return new Integer(NetUtils.getUnsignedShort((short) transportPort - .getValue())); + return NetUtils.getUnsignedShort((short) transportPort.getValue()); } return null; } @@ -265,8 +264,7 @@ public final class FromSalConversionsUtils { final MatchField dataLinkType = sourceMatch.getField(MatchType.DL_TYPE); if (dataLinkType != null && dataLinkType.getValue() != null) { - EtherType etherType = new EtherType(new Long( - NetUtils.getUnsignedShort((Short) dataLinkType.getValue()))); + EtherType etherType = new EtherType((long) NetUtils.getUnsignedShort((Short) dataLinkType.getValue())); EthernetTypeBuilder ethType = new EthernetTypeBuilder() .setType(etherType); targetEthMatchBuild.setEthernetType(ethType.build()); diff --git a/legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/ToSalConversionsUtils.java b/legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/ToSalConversionsUtils.java index 4ee26637e1..914ae9f107 100644 --- a/legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/ToSalConversionsUtils.java +++ b/legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/ToSalConversionsUtils.java @@ -567,7 +567,7 @@ public class ToSalConversionsUtils { target.setField(DL_DST, bytesFrom(targetHwAddress.getAddress())); } - target.setField(DL_TYPE, new Short(ETHERNET_ARP)); + target.setField(DL_TYPE, ETHERNET_ARP); } diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java index d82d0f76ac..2477d66cfa 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java @@ -1202,7 +1202,7 @@ public final class ActionConvertor { } private Short getShortValue() { - return new Short((short) protocol); + return (short) protocol; } private IPProtocols fromProtocolNum(Short protocolNum) { diff --git a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/util/OpenflowPortsUtil.java b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/util/OpenflowPortsUtil.java index a6debe24ca..356d2a5a73 100644 --- a/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/util/OpenflowPortsUtil.java +++ b/openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/util/OpenflowPortsUtil.java @@ -28,15 +28,15 @@ public class OpenflowPortsUtil { // v1.0 ports final ImmutableBiMap OFv10 = new ImmutableBiMap.Builder() - .put(OutputPortValues.MAX.toString(), new Long(PortNumberValuesV10.MAX.getIntValue())) //0xff00 - .put(OutputPortValues.INPORT.toString(), new Long(PortNumberValuesV10.INPORT.getIntValue())) //0xfff8 - .put(OutputPortValues.TABLE.toString(), new Long(PortNumberValuesV10.TABLE.getIntValue())) //0xfff9 - .put(OutputPortValues.NORMAL.toString(), new Long(PortNumberValuesV10.NORMAL.getIntValue())) //0xfffa - .put(OutputPortValues.FLOOD.toString(), new Long(PortNumberValuesV10.FLOOD.getIntValue())) //0xfffb - .put(OutputPortValues.ALL.toString(), new Long(PortNumberValuesV10.ALL.getIntValue())) //0xfffc - .put(OutputPortValues.CONTROLLER.toString(), new Long(PortNumberValuesV10.CONTROLLER.getIntValue())) //0xfffd - .put(OutputPortValues.LOCAL.toString(), new Long(PortNumberValuesV10.LOCAL.getIntValue())) //0xfffe - .put(OutputPortValues.NONE.toString(), new Long(PortNumberValuesV10.NONE.getIntValue())) //0xfffe + .put(OutputPortValues.MAX.toString(), Long.valueOf(PortNumberValuesV10.MAX.getIntValue())) //0xff00 + .put(OutputPortValues.INPORT.toString(), Long.valueOf(PortNumberValuesV10.INPORT.getIntValue())) //0xfff8 + .put(OutputPortValues.TABLE.toString(), Long.valueOf(PortNumberValuesV10.TABLE.getIntValue())) //0xfff9 + .put(OutputPortValues.NORMAL.toString(), Long.valueOf(PortNumberValuesV10.NORMAL.getIntValue())) //0xfffa + .put(OutputPortValues.FLOOD.toString(), Long.valueOf(PortNumberValuesV10.FLOOD.getIntValue())) //0xfffb + .put(OutputPortValues.ALL.toString(), Long.valueOf(PortNumberValuesV10.ALL.getIntValue())) //0xfffc + .put(OutputPortValues.CONTROLLER.toString(), Long.valueOf(PortNumberValuesV10.CONTROLLER.getIntValue())) //0xfffd + .put(OutputPortValues.LOCAL.toString(), Long.valueOf(PortNumberValuesV10.LOCAL.getIntValue())) //0xfffe + .put(OutputPortValues.NONE.toString(), Long.valueOf(PortNumberValuesV10.NONE.getIntValue())) //0xfffe .build(); // openflow 1.3 reserved ports. diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java index e925e6b649..6f6a115a64 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java @@ -300,7 +300,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid private static InstructionsBuilder createMeterInstructions() { MeterBuilder aab = new MeterBuilder(); - aab.setMeterId(new MeterId(new Long(1))); + aab.setMeterId(new MeterId(1L)); InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new MeterCaseBuilder().setMeter(aab.build()).build()); @@ -394,7 +394,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid ActionBuilder ab = new ActionBuilder(); PushMplsActionBuilder push = new PushMplsActionBuilder(); - push.setEthernetType(new Integer(0x8847)); + push.setEthernetType(0x8847); ab.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build()); actionList.add(ab.build()); // Create an Apply Action @@ -419,7 +419,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid ActionBuilder ab = new ActionBuilder(); PushPbbActionBuilder pbb = new PushPbbActionBuilder(); - pbb.setEthernetType(new Integer(0x88E7)); + pbb.setEthernetType(0x88E7); ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build()); actionList.add(ab.build()); // Create an Apply Action @@ -539,9 +539,9 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid if (null == flow.isBarrier()) { flow.setBarrier(Boolean.FALSE); } - // flow.setBufferId(new Long(12)); - BigInteger value = new BigInteger("10", 10); - BigInteger outputPort = new BigInteger("4294967295", 10); + // flow.setBufferId(12L); + BigInteger value = BigInteger.valueOf(10); + BigInteger outputPort = BigInteger.valueOf(4294967295L); flow.setCookie(new FlowCookie(value)); flow.setCookieMask(new FlowCookie(value)); flow.setHardTimeout(0); @@ -552,7 +552,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid flow.setFlags(new FlowModFlags(false, false, false, false, true)); flow.setId(new FlowId("12")); flow.setTableId(getTableId(tableId)); - flow.setOutGroup(new Long("4294967295")); + flow.setOutGroup(4294967295L); // set outport to OFPP_NONE (65535) to disable remove restriction for // flow flow.setOutPort(outputPort); @@ -894,7 +894,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid private List createPushVlanAction() { PushVlanActionBuilder vlan = new PushVlanActionBuilder(); - vlan.setEthernetType(new Integer(0x8100)); + vlan.setEthernetType(0x8100); VlanId v = new VlanId(2); vlan.setVlanId(v); ActionBuilder action = new ActionBuilder(); @@ -906,7 +906,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid private List createPushMplsAction() { PushMplsActionBuilder push = new PushMplsActionBuilder(); - push.setEthernetType(new Integer(0x8847)); + push.setEthernetType(0x8847); ActionBuilder action = new ActionBuilder(); action.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build()); List actions = new ArrayList(); @@ -935,7 +935,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid private List createPushPbbAction() { PushPbbActionBuilder pbb = new PushPbbActionBuilder(); - pbb.setEthernetType(new Integer(0x88E7)); + pbb.setEthernetType(0x88E7); ActionBuilder action = new ActionBuilder(); action.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build()); List actions = new ArrayList(); diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java index 35ac71592e..8cf3cbd3af 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java @@ -409,9 +409,9 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { if (null == flow.isBarrier()) { flow.setBarrier(Boolean.FALSE); } - // flow.setBufferId(new Long(12)); - BigInteger value = new BigInteger("10", 10); - BigInteger outputPort = new BigInteger("4294967295", 10); + // flow.setBufferId(12L); + BigInteger value = BigInteger.valueOf(10); + BigInteger outputPort = BigInteger.valueOf(4294967295L); flow.setCookie(new FlowCookie(value)); flow.setCookieMask(new FlowCookie(value)); flow.setHardTimeout(0); @@ -422,7 +422,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { flow.setFlags(new FlowModFlags(false, false, false, false, true)); flow.setId(new FlowId("12")); flow.setTableId(getTableId(tableId)); - flow.setOutGroup(new Long("4294967295")); + flow.setOutGroup(4294967295L); // set outport to OFPP_NONE (65535) to disable remove restriction for // flow flow.setOutPort(outputPort); @@ -768,7 +768,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { private static InstructionsBuilder createMeterInstructions() { MeterBuilder aab = new MeterBuilder(); - aab.setMeterId(new MeterId(new Long(1))); + aab.setMeterId(new MeterId(1L)); InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new MeterCaseBuilder().setMeter(aab.build()).build()); @@ -852,7 +852,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { ActionBuilder ab = new ActionBuilder(); OutputActionBuilder output = new OutputActionBuilder(); - output.setMaxLength(new Integer(0xffff)); + output.setMaxLength(0xffff); Uri value = new Uri(OutputPortValues.CONTROLLER.toString()); output.setOutputNodeConnector(value); ab.setAction(new OutputActionCaseBuilder().setOutputAction(output.build()).build()); @@ -883,7 +883,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { ActionBuilder ab = new ActionBuilder(); PushMplsActionBuilder push = new PushMplsActionBuilder(); - push.setEthernetType(new Integer(0x8847)); + push.setEthernetType(0x8847); ab.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build()); actionList.add(ab.build()); // Create an Apply Action @@ -908,7 +908,7 @@ public class OpenflowPluginBulkTransactionProvider implements CommandProvider { ActionBuilder ab = new ActionBuilder(); PushPbbActionBuilder pbb = new PushPbbActionBuilder(); - pbb.setEthernetType(new Integer(0x88E7)); + pbb.setEthernetType(0x88E7); ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build()); actionList.add(ab.build()); // Create an Apply Action diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java index 29945b0b03..73daaa205c 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java @@ -281,7 +281,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { private List createPushVlanAction() { PushVlanActionBuilder vlan = new PushVlanActionBuilder(); - vlan.setEthernetType(new Integer(0x8100)); + vlan.setEthernetType(0x8100); ActionBuilder action = new ActionBuilder(); action.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build()); List actions = new ArrayList(); @@ -291,7 +291,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { private List createPushMplsAction() { PushMplsActionBuilder push = new PushMplsActionBuilder(); - push.setEthernetType(new Integer(0x8847)); + push.setEthernetType(0x8847); ActionBuilder action = new ActionBuilder(); action.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build()); List actions = new ArrayList(); @@ -320,7 +320,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { private List createPushPbbAction() { PushPbbActionBuilder pbb = new PushPbbActionBuilder(); - pbb.setEthernetType(new Integer(0x88E7)); + pbb.setEthernetType(0x88E7); ActionBuilder action = new ActionBuilder(); action.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build()); List actions = new ArrayList(); @@ -550,7 +550,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { List actionList = new ArrayList(); ActionBuilder ab = new ActionBuilder(); PushMplsActionBuilder push = new PushMplsActionBuilder(); - push.setEthernetType(new Integer(0x8849)); + push.setEthernetType(0x8849); ab.setAction(new PushMplsActionCaseBuilder().setPushMplsAction(push.build()).build()); actionList.add(ab.build()); return actionList; @@ -562,7 +562,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { List actionList = new ArrayList(); ActionBuilder ab = new ActionBuilder(); PushPbbActionBuilder pbb = new PushPbbActionBuilder(); - pbb.setEthernetType(new Integer(0x88E8)); + pbb.setEthernetType(0x88E8); ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build()); actionList.add(ab.build()); return actionList; @@ -575,7 +575,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider { List actionList = new ArrayList(); ActionBuilder ab = new ActionBuilder(); PushVlanActionBuilder vlan = new PushVlanActionBuilder(); - vlan.setEthernetType(new Integer(0x8101)); + vlan.setEthernetType(0x8101); ab.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build()); actionList.add(ab.build()); return actionList; diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java index 0add3c3b24..ca4b11f514 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java @@ -139,13 +139,13 @@ public class OpenflowpluginTableFeaturesTestCommandProvider implements CommandPr TableFeaturesBuilder tableFeature1 = new TableFeaturesBuilder(); - tableFeature1.setTableId(new Short((short) 0)); + tableFeature1.setTableId((short) 0); tableFeature1.setName("Table 0"); - tableFeature1.setMetadataMatch((new BigInteger("10", 10))); - tableFeature1.setMetadataWrite((new BigInteger("10", 10))); - tableFeature1.setMaxEntries(new Long(10000)); + tableFeature1.setMetadataMatch(BigInteger.valueOf(10)); + tableFeature1.setMetadataWrite(BigInteger.valueOf(10)); + tableFeature1.setMaxEntries(10000L); tableFeature1.setConfig(new TableConfig(false)); diff --git a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java index 908a2fe593..0edbd7defe 100644 --- a/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java +++ b/test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java @@ -213,13 +213,13 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { private NodeBuilder createTestNode(String nodeId) { String localNodeId; - + if (nodeId == null) { localNodeId = OpenflowpluginTestActivator.NODE_ID; } else { localNodeId = nodeId; } - + NodeBuilder builder = new NodeBuilder(); builder.setId(new NodeId(localNodeId)); builder.setKey(new NodeKey(builder.getId())); @@ -232,7 +232,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { private FlowBuilder createTestFlow(NodeBuilder nodeBuilder, String flowTypeArg, String tableId) { final long TEST_ID = 123; - + FlowBuilder flow = new FlowBuilder(); long id = TEST_ID; @@ -661,26 +661,26 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { break; case "f83": // Test TCP_Flag Match - id += 83; + id += 83; flow.setMatch(createTcpFlagMatch().build()); flow.setInstructions(createDropInstructions().build()); break; case "f84": id += 84; // match vlan=10,dl_vlan_pcp=3 - flow.setMatch(createVlanMatch().build()); + flow.setMatch(createVlanMatch().build()); // vlan_pcp=4 - flow.setInstructions(createAppyActionInstruction88().build()); + flow.setInstructions(createAppyActionInstruction88().build()); break; case "f85": // Test Tunnel IPv4 Src (e.g. set_field:172.16.100.200->tun_src) - id += 85; + id += 85; flow.setMatch(createMatch3().build()); flow.setInstructions(createTunnelIpv4SrcInstructions().build()); break; case "f86": // Test Tunnel IPv4 Dst (e.g. set_field:172.16.100.100->tun_dst) - id += 86; + id += 86; flow.setMatch(createMatch1().build()); flow.setInstructions(createTunnelIpv4DstInstructions().build()); break; @@ -715,7 +715,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { FlowBuilder flow = new FlowBuilder(); String flowType = flowTypeArg; int flowId = id; - + if (flowType == null) { flowType = "f1"; } @@ -774,7 +774,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { try { table = Short.parseShort(tableId); } catch (Exception ex) { - LOG.info("Parsing String tableId {} failed. Continuing with default tableId {}.", + LOG.info("Parsing String tableId {} failed. Continuing with default tableId {}.", tableId, table); } return table; @@ -818,7 +818,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { private static InstructionsBuilder createMeterInstructions() { MeterBuilder aab = new MeterBuilder(); - aab.setMeterId(new MeterId(new Long(1))); + aab.setMeterId(new MeterId(1L)); InstructionBuilder ib = new InstructionBuilder(); ib.setInstruction(new MeterCaseBuilder().setMeter(aab.build()).build()); @@ -2774,13 +2774,13 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { match.setEthernetMatch(eth.build()); // ipv4 version - IpMatchBuilder ipmatch = new IpMatchBuilder(); + IpMatchBuilder ipmatch = new IpMatchBuilder(); ipmatch.setIpProtocol((short) 256); match.setIpMatch(ipmatch.build()); - + // icmpv6 Icmpv6MatchBuilder icmpv6match = new Icmpv6MatchBuilder(); - + // match icmpv6match.setIcmpv6Type((short) 135); icmpv6match.setIcmpv6Code((short) 1); @@ -2848,7 +2848,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { private static MatchBuilder createVlanMatch() { MatchBuilder match = new MatchBuilder(); // vlan match - VlanMatchBuilder vlanBuilder = new VlanMatchBuilder(); + VlanMatchBuilder vlanBuilder = new VlanMatchBuilder(); VlanIdBuilder vlanIdBuilder = new VlanIdBuilder(); VlanId vlanId = new VlanId(10); VlanPcp vpcp = new VlanPcp((short) 3); @@ -2875,11 +2875,11 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { ethmatch.setEthernetType(ethtype.setType(type).build()); // ipv4 match - Ipv4Prefix dstip = new Ipv4Prefix("200.71.9.52/10"); + Ipv4Prefix dstip = new Ipv4Prefix("200.71.9.52/10"); Ipv4Prefix srcip = new Ipv4Prefix("100.1.1.1/8"); // arp match - ArpMatchBuilder arpmatch = new ArpMatchBuilder(); + ArpMatchBuilder arpmatch = new ArpMatchBuilder(); ArpSourceHardwareAddressBuilder arpsrc = new ArpSourceHardwareAddressBuilder(); arpsrc.setAddress(macsrc); arpsrc.setMask(new MacAddress("ff:ff:ff:00:00:00")); @@ -2913,7 +2913,7 @@ public class OpenflowpluginTestCommandProvider implements CommandProvider { Ipv4MatchBuilder ipv4Match = new Ipv4MatchBuilder(); // ipv4 match - Ipv4Prefix dstip = new Ipv4Prefix("200.71.9.52/10"); + Ipv4Prefix dstip = new Ipv4Prefix("200.71.9.52/10"); Ipv4Prefix srcip = new Ipv4Prefix("100.1.1.1/8"); Ipv4MatchBuilder ipv4match = new Ipv4MatchBuilder(); ipv4match.setIpv4Destination(dstip); -- 2.36.6