<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="AvoidStarImport"/>
+ <module name="NeedBraces"/>
<module name="UpperEll"/>
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
MappingEntry other = (MappingEntry) obj;
if (mappingValueKey == null) {
- if (other.mappingValueKey != null)
+ if (other.mappingValueKey != null) {
return false;
- } else if (!mappingValueKey.equals(other.mappingValueKey))
+ }
+ } else if (!mappingValueKey.equals(other.mappingValueKey)) {
return false;
+ }
if (value == null) {
- if (other.value != null)
+ if (other.value != null) {
return false;
- } else if (!value.equals(other.value))
+ }
+ } else if (!value.equals(other.value)) {
return false;
+ }
return true;
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
MappingValueKey<?> other = (MappingValueKey<?>) obj;
if (key == null) {
- if (other.key != null)
+ if (other.key != null) {
return false;
- } else if (!key.equals(other.key))
+ }
+ } else if (!key.equals(other.key)) {
return false;
+ }
return true;
}
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (getClass() != obj.getClass()) {
return false;
+ }
SubscriberRLOC other = (SubscriberRLOC) obj;
- if (!rloc.equals(other.rloc))
+ if (!rloc.equals(other.rloc)) {
return false;
+ }
return true;
}
String str = null;
- if (context != null)
+ if (context != null) {
str = context.getProperty(LISP_MAPPING_OVERWRITE);
+ }
if (str == null) {
str = System.getProperty(LISP_MAPPING_OVERWRITE);
String str = null;
- if (context != null)
+ if (context != null) {
str = context.getProperty(LISP_SMR);
+ }
if (str == null) {
str = System.getProperty(LISP_SMR);
String str = null;
- if (context != null)
+ if (context != null) {
str = context.getProperty(LISP_ELP_POLICY);
+ }
if (str == null) {
str = System.getProperty(LISP_ELP_POLICY);
while (interfaces.hasMoreElements()) {
NetworkInterface current = interfaces.nextElement();
LOG.debug("Interface " + current.toString());
- if (!current.isUp() || current.isLoopback() || current.isVirtual())
+ if (!current.isUp() || current.isLoopback() || current.isVirtual()) {
continue;
+ }
Enumeration<InetAddress> addresses = current.getInetAddresses();
while (addresses.hasMoreElements()) {
InetAddress current_addr = addresses.nextElement();
// Skip loopback and link local addresses
- if (current_addr.isLoopbackAddress() || current_addr.isLinkLocalAddress())
+ if (current_addr.isLoopbackAddress() || current_addr.isLinkLocalAddress()) {
continue;
+ }
LOG.debug(current_addr.getHostAddress());
return current_addr;
}
buffer.get(macBuffer);
StringBuilder sb = new StringBuilder(17);
for (byte b : macBuffer) {
- if (sb.length() > 0)
+ if (sb.length() > 0) {
sb.append(':');
+ }
sb.append(String.format("%02x", b));
}
return new MacAddress(sb.toString());
ByteBuffer byteRepresentation = ByteBuffer.wrap(address.getAddress());
byte b = (byte) 0xff;
for (int i = 0; i < byteRepresentation.array().length; i++) {
- if (mask >= 8)
+ if (mask >= 8) {
byteRepresentation.put(i, (byte) (b & byteRepresentation.get(i)));
-
- else if (mask > 0) {
+ } else if (mask > 0) {
byteRepresentation.put(i, (byte) ((byte) (b << (8 - mask)) & byteRepresentation.get(i)));
} else {
byteRepresentation.put(i, (byte) (0 & byteRepresentation.get(i)));