8273243: Fix indentations in java.net.InetAddress methods
Reviewed-by: dfuchs, bpb
This commit is contained in:
parent
152e66923d
commit
0c1b16b75a
@ -680,13 +680,13 @@ public class InetAddress implements java.io.Serializable {
|
||||
InetAddress[] arr = InetAddress.getAllByName0(host, check);
|
||||
boolean ok = false;
|
||||
|
||||
if(arr != null) {
|
||||
for(int i = 0; !ok && i < arr.length; i++) {
|
||||
if (arr != null) {
|
||||
for (int i = 0; !ok && i < arr.length; i++) {
|
||||
ok = addr.equals(arr[i]);
|
||||
}
|
||||
}
|
||||
|
||||
//XXX: if it looks a spoof just return the address?
|
||||
//XXX: if it looks like a spoof just return the address?
|
||||
if (!ok) {
|
||||
host = addr.getHostAddress();
|
||||
return host;
|
||||
@ -1510,8 +1510,7 @@ public class InetAddress implements java.io.Serializable {
|
||||
}
|
||||
|
||||
static InetAddress[] getAddressesFromNameService(String host, InetAddress reqAddr)
|
||||
throws UnknownHostException
|
||||
{
|
||||
throws UnknownHostException {
|
||||
InetAddress[] addresses = null;
|
||||
UnknownHostException ex = null;
|
||||
|
||||
@ -1519,9 +1518,8 @@ public class InetAddress implements java.io.Serializable {
|
||||
addresses = nameService.lookupAllHostAddr(host);
|
||||
} catch (UnknownHostException uhe) {
|
||||
if (host.equalsIgnoreCase("localhost")) {
|
||||
addresses = new InetAddress[] { impl.loopbackAddress() };
|
||||
}
|
||||
else {
|
||||
addresses = new InetAddress[]{impl.loopbackAddress()};
|
||||
} else {
|
||||
ex = uhe;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user