Changed getActions() to just take the action list from ApplyActions if found instead of creating a new list, as ApplyActions may only appear once.
diff --git a/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java
index c3a42e3..ce71981 100644
--- a/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowAddVer13.Builder_getActions.java
@@ -9,12 +9,11 @@
return Collections.emptyList();
//:: #endif
//:: #endif
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowAddVer13_getActions.java b/java_gen/templates/custom/OFFlowAddVer13_getActions.java
index 3b56d52..eb7799a 100644
--- a/java_gen/templates/custom/OFFlowAddVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowAddVer13_getActions.java
@@ -1,12 +1,11 @@
@Override
public List<OFAction> getActions()throws UnsupportedOperationException {
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java
index c3a42e3..ce71981 100644
--- a/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowDeleteStrictVer13.Builder_getActions.java
@@ -9,12 +9,11 @@
return Collections.emptyList();
//:: #endif
//:: #endif
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java b/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java
index 3b56d52..eb7799a 100644
--- a/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowDeleteStrictVer13_getActions.java
@@ -1,12 +1,11 @@
@Override
public List<OFAction> getActions()throws UnsupportedOperationException {
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java
index c3a42e3..ce71981 100644
--- a/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowDeleteVer13.Builder_getActions.java
@@ -9,12 +9,11 @@
return Collections.emptyList();
//:: #endif
//:: #endif
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java b/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java
index 3b56d52..eb7799a 100644
--- a/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowDeleteVer13_getActions.java
@@ -1,12 +1,11 @@
@Override
public List<OFAction> getActions()throws UnsupportedOperationException {
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java
index c3a42e3..ce71981 100644
--- a/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer13.Builder_getActions.java
@@ -9,12 +9,11 @@
return Collections.emptyList();
//:: #endif
//:: #endif
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java b/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java
index 3b56d52..eb7799a 100644
--- a/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowModifyStrictVer13_getActions.java
@@ -1,12 +1,11 @@
@Override
public List<OFAction> getActions()throws UnsupportedOperationException {
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java b/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java
index c3a42e3..ce71981 100644
--- a/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java
+++ b/java_gen/templates/custom/OFFlowModifyVer13.Builder_getActions.java
@@ -9,12 +9,11 @@
return Collections.emptyList();
//:: #endif
//:: #endif
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file
diff --git a/java_gen/templates/custom/OFFlowModifyVer13_getActions.java b/java_gen/templates/custom/OFFlowModifyVer13_getActions.java
index 3b56d52..eb7799a 100644
--- a/java_gen/templates/custom/OFFlowModifyVer13_getActions.java
+++ b/java_gen/templates/custom/OFFlowModifyVer13_getActions.java
@@ -1,12 +1,11 @@
@Override
public List<OFAction> getActions()throws UnsupportedOperationException {
- ImmutableList.Builder<OFAction> builder = ImmutableList.builder();
for (OFInstruction inst : this.instructions) {
if (inst instanceof OFInstructionApplyActions) {
OFInstructionApplyActions iap = (OFInstructionApplyActions)inst;
- builder.addAll(iap.getActions());
+ return iap.getActions();
}
}
- return builder.build();
+ return Collections.emptyList();
}
\ No newline at end of file