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/packet/DHCP.java b/src/main/java/net/onrc/onos/core/packet/DHCP.java
index 3d51cf8..aea1ab1 100644
--- a/src/main/java/net/onrc/onos/core/packet/DHCP.java
+++ b/src/main/java/net/onrc/onos/core/packet/DHCP.java
@@ -286,8 +286,9 @@
*/
public DHCPOption getOption(DHCPOptionCode optionCode) {
for (DHCPOption opt : options) {
- if (opt.code == optionCode.value)
+ if (opt.code == optionCode.value) {
return opt;
+ }
}
return null;
}
@@ -368,8 +369,9 @@
}
}
int optionsPadLength = 0;
- if (optionsLength < 60)
+ if (optionsLength < 60) {
optionsPadLength = 60 - optionsLength;
+ }
byte[] data = new byte[240 + optionsLength + optionsPadLength];
ByteBuffer bb = ByteBuffer.wrap(data);
@@ -454,8 +456,9 @@
this.clientHardwareAddress = new byte[hardwareAddressLength];
bb.get(this.clientHardwareAddress);
- for (int i = hardwareAddressLength; i < 16; ++i)
+ for (int i = hardwareAddressLength; i < 16; ++i) {
bb.get();
+ }
this.serverName = readString(bb, 64);
this.bootFileName = readString(bb, 128);
// read the magic cookie