Do not instantiate Long/Short/Integer 53/16953/14
authorRobert Varga <rovarga@cisco.com>
Sun, 22 Mar 2015 14:03:48 +0000 (15:03 +0100)
committerRobert Varga <rovarga@cisco.com>
Fri, 10 Apr 2015 18:47:05 +0000 (20:47 +0200)
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 <rovarga@cisco.com>
Signed-off-by: Michal Rehak <mirehak@cisco.com>
legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/FromSalConversionsUtils.java
legacy/sal-compatibility/src/main/java/org/opendaylight/openflowplugin/legacy/sal/compatibility/ToSalConversionsUtils.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/ActionConvertor.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/util/OpenflowPortsUtil.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkGroupTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowPluginBulkTransactionProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginGroupTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTableFeaturesTestCommandProvider.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/OpenflowpluginTestCommandProvider.java

index 7c299792564da3e6ec4cb68dd99a25c168b124cb..f7ea9c0c19059788e35d11a36c6076a861cf8a2b 100644 (file)
@@ -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());
index 4ee26637e1fb3fd3b383ba5a3b07fe16bffaa8f5..914ae9f10769ade4ee548b929c7424563b97cfb5 100644 (file)
@@ -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);
 
     }
 
index d82d0f76acc80814a6575a6c9ff2ff89b46f16c5..2477d66cfa428898bec1c555890f8a9a948a4220 100644 (file)
@@ -1202,7 +1202,7 @@ public final class ActionConvertor {
         }
 
         private Short getShortValue() {
-            return new Short((short) protocol);
+            return (short) protocol;
         }
 
         private IPProtocols fromProtocolNum(Short protocolNum) {
index a6debe24ca6855f810cfb8cc9cc853c019f125cf..356d2a5a730f598c36b4f2b29a187ebf6d7c1102 100644 (file)
@@ -28,15 +28,15 @@ public class OpenflowPortsUtil {
 
         // v1.0 ports
         final ImmutableBiMap<String, Long> OFv10 = new ImmutableBiMap.Builder<String, Long>()
-                .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.
index e925e6b649a9b21244fe2775a9c507cea18fdc65..6f6a115a6401003719b8dcd02c6f80998562dcdc 100644 (file)
@@ -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<Action> 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<Action> 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<Action> actions = new ArrayList<Action>();
@@ -935,7 +935,7 @@ public class OpenflowPluginBulkGroupTransactionProvider implements CommandProvid
 
     private List<Action> 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<Action> actions = new ArrayList<Action>();
index 35ac71592ee18ab48dd0e139a3e496343fffc448..8cf3cbd3af30b4dfcdf8b26c54c6eb3ac3bc0018 100644 (file)
@@ -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
index 29945b0b034ddaa96d41957c4c0f600785d2fb41..73daaa205c5469b5ef401a3c235442b6a6dba982 100644 (file)
@@ -281,7 +281,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
 
     private List<Action> 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<Action> actions = new ArrayList<Action>();
@@ -291,7 +291,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
 
     private List<Action> 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<Action> actions = new ArrayList<Action>();
@@ -320,7 +320,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
 
     private List<Action> 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<Action> actions = new ArrayList<Action>();
@@ -550,7 +550,7 @@ public class OpenflowpluginGroupTestCommandProvider implements CommandProvider {
         List<Action> actionList = new ArrayList<Action>();
         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<Action> actionList = new ArrayList<Action>();
         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<Action> actionList = new ArrayList<Action>();
         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;
index 0add3c3b24fcb2037b210ab07ef157524a20e1b8..ca4b11f5142be10d5c3c4dd7baa6c6a037ac2925 100644 (file)
@@ -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));
 
index 908a2fe5937a97645f732b231644379e53f38af9..0edbd7defecb940022fbb9af576103a8d78c8e67 100644 (file)
@@ -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);