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/LLDPTLV.java b/src/main/java/net/onrc/onos/core/packet/LLDPTLV.java
index 7b852e2..e23ce11 100644
--- a/src/main/java/net/onrc/onos/core/packet/LLDPTLV.java
+++ b/src/main/java/net/onrc/onos/core/packet/LLDPTLV.java
@@ -81,8 +81,9 @@
byte[] data = new byte[2 + this.length];
ByteBuffer bb = ByteBuffer.wrap(data);
bb.putShort(scratch);
- if (this.value != null)
+ if (this.value != null) {
bb.put(this.value);
+ }
return data;
}
@@ -95,8 +96,9 @@
this.value = new byte[this.length];
// if there is an underrun just toss the TLV
- if (bb.remaining() < this.length)
+ if (bb.remaining() < this.length) {
return null;
+ }
bb.get(this.value);
}
return this;
@@ -120,19 +122,25 @@
*/
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (!(obj instanceof LLDPTLV))
+ }
+ if (!(obj instanceof LLDPTLV)) {
return false;
+ }
LLDPTLV other = (LLDPTLV) obj;
- if (length != other.length)
+ if (length != other.length) {
return false;
- if (type != other.type)
+ }
+ if (type != other.type) {
return false;
- if (!Arrays.equals(value, other.value))
+ }
+ if (!Arrays.equals(value, other.value)) {
return false;
+ }
return true;
}
}