Do not instantiate Long/Short/Integer
[openflowplugin.git] / test-provider / src / main / java / org / opendaylight / openflowplugin / test / OpenflowPluginBulkGroupTransactionProvider.java
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>();