Fix checkstyle
[openflowplugin.git] / test-provider / src / main / java / org / opendaylight / openflowplugin / test / OpenflowpluginGroupTestCommandProvider.java
index 8efa368ff8e2da8c4cbb483261b2552b3b31ec3b..6bc754ad3c85294705b155371344f5223144f637 100644 (file)
@@ -116,9 +116,6 @@ public final class OpenflowpluginGroupTestCommandProvider implements CommandProv
     private GroupBuilder createTestGroup(String actionType, String groupType, final String groupMod) {
         // Sample data , committing to DataStore
 
-        GroupBuilder group = new GroupBuilder();
-        BucketBuilder bucket = new BucketBuilder().withKey(new BucketKey(new BucketId(Uint32.valueOf(12))));
-
         if (groupType == null) {
             groupType = "g1";
         }
@@ -126,6 +123,7 @@ public final class OpenflowpluginGroupTestCommandProvider implements CommandProv
             actionType = "a1";
         }
 
+        final var group = new GroupBuilder();
         switch (groupType) {
             case "g1":
                 group.setGroupType(GroupTypes.GroupSelect);
@@ -143,6 +141,7 @@ public final class OpenflowpluginGroupTestCommandProvider implements CommandProv
                 break;
         }
 
+        final var bucket = new BucketBuilder().withKey(new BucketKey(new BucketId(Uint32.valueOf(12))));
         switch (actionType) {
             case "a1":
                 bucket.setAction(createPopVlanAction());