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/apps/bgproute/Ptree.java b/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
index 7f9a009..8159b57 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/Ptree.java
@@ -112,7 +112,7 @@
PtreeNode node = top;
PtreeNode matched = null;
- if (node != null)
+ if (node != null) {
while (node != null
&& node.keyBits <= key_bits
@@ -125,6 +125,7 @@
node = node.left;
}
}
+ }
if (matched != null) {
return addReference(matched);
@@ -273,11 +274,13 @@
PtreeNode add = new PtreeNode(null, commonLen, maxKeyOctets);
int j;
- for (j = 0; j < i; j++)
+ for (j = 0; j < i; j++) {
add.key[j] = node.key[j];
+ }
- if (boundary != 0)
+ if (boundary != 0) {
add.key[j] = (byte) (node.key[j] & maskBits[add.keyBits % 8]);
+ }
return add;
}
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index 15aed60..d3db080 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -557,11 +557,13 @@
for (Entry<String, IntentState> entry : value.entrySet()) {
log.debug("path intent key {}, value {}", entry.getKey(), entry.getValue());
PathIntent pathIntent = (PathIntent) intentMap.getIntent(entry.getKey());
- if (pathIntent == null)
+ if (pathIntent == null) {
continue;
+ }
- if (!(pathIntent.getParentIntent() instanceof ShortestPathIntent))
+ if (!(pathIntent.getParentIntent() instanceof ShortestPathIntent)) {
continue;
+ }
IntentState state = entry.getValue();
switch (state) {