Enable checkstyle check for blocks without braces.
Enable the checkstyle rule to check for block statements
without curly braces and fix any violations it finds.
Change-Id: Id4c58cea26f0d9ce7ed78643a4943c042886a12d
diff --git a/src/main/java/net/onrc/onos/core/util/FlowEntryActions.java b/src/main/java/net/onrc/onos/core/util/FlowEntryActions.java
index 421312e..62d9a65 100644
--- a/src/main/java/net/onrc/onos/core/util/FlowEntryActions.java
+++ b/src/main/java/net/onrc/onos/core/util/FlowEntryActions.java
@@ -119,8 +119,9 @@
actions = new ArrayList<FlowEntryAction>();
- if (decode.isEmpty())
+ if (decode.isEmpty()) {
return; // Nothing to do
+ }
// Remove the '[' and ']' in the beginning and the end of the string
if ((decode.length() > 1) && (decode.charAt(0) == '[') &&
@@ -134,8 +135,9 @@
String[] parts = decode.split(";");
for (int i = 0; i < parts.length; i++) {
decode = parts[i];
- if ((decode == null) || decode.isEmpty())
+ if ((decode == null) || decode.isEmpty()) {
continue;
+ }
FlowEntryAction flowEntryAction = null;
try {
flowEntryAction = new FlowEntryAction(decode);
@@ -143,8 +145,9 @@
// TODO: Ignore invalid actions for now
continue;
}
- if (flowEntryAction != null)
+ if (flowEntryAction != null) {
actions.add(flowEntryAction);
+ }
}
}
}