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);
|
InetAddress[] arr = InetAddress.getAllByName0(host, check);
|
||||||
boolean ok = false;
|
boolean ok = false;
|
||||||
|
|
||||||
if(arr != null) {
|
if (arr != null) {
|
||||||
for(int i = 0; !ok && i < arr.length; i++) {
|
for (int i = 0; !ok && i < arr.length; i++) {
|
||||||
ok = addr.equals(arr[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) {
|
if (!ok) {
|
||||||
host = addr.getHostAddress();
|
host = addr.getHostAddress();
|
||||||
return host;
|
return host;
|
||||||
@ -1510,8 +1510,7 @@ public class InetAddress implements java.io.Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static InetAddress[] getAddressesFromNameService(String host, InetAddress reqAddr)
|
static InetAddress[] getAddressesFromNameService(String host, InetAddress reqAddr)
|
||||||
throws UnknownHostException
|
throws UnknownHostException {
|
||||||
{
|
|
||||||
InetAddress[] addresses = null;
|
InetAddress[] addresses = null;
|
||||||
UnknownHostException ex = null;
|
UnknownHostException ex = null;
|
||||||
|
|
||||||
@ -1519,9 +1518,8 @@ public class InetAddress implements java.io.Serializable {
|
|||||||
addresses = nameService.lookupAllHostAddr(host);
|
addresses = nameService.lookupAllHostAddr(host);
|
||||||
} catch (UnknownHostException uhe) {
|
} catch (UnknownHostException uhe) {
|
||||||
if (host.equalsIgnoreCase("localhost")) {
|
if (host.equalsIgnoreCase("localhost")) {
|
||||||
addresses = new InetAddress[] { impl.loopbackAddress() };
|
addresses = new InetAddress[]{impl.loopbackAddress()};
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
ex = uhe;
|
ex = uhe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user