Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
md5555 committed May 23, 2016
1 parent 877787d commit 5e0d24a
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,20 @@ protected boolean isUsableAddress(NetworkInterface networkInterface, InetAddress
try {
field0 = InetAddress.class.getDeclaredField("holder");
field0.setAccessible(true);
target = field0.get(address);
field0 = target.getClass().getDeclaredField("hostName");
target = field0.get(address);
field0 = target.getClass().getDeclaredField("hostName");
} catch( NoSuchFieldException e ) {
// Let's try the non-OpenJDK variant
field0 = InetAddress.class.getDeclaredField("hostName");
field0 = InetAddress.class.getDeclaredField("hostName");
target = address;
}

if (field0 != null && target != null && hostName != null) {
field0.setAccessible(true);
field0.set(target, hostName);
} else {
return false;
}
field0.setAccessible(true);
field0.set(target, hostName);
} else {
return false;
}

} catch (Exception ex) {
log.log(Level.SEVERE,
Expand Down

0 comments on commit 5e0d24a

Please sign in to comment.