re PR libgcj/17069 (InetAddress.getLocalHost() returns broken InetAddress object if hostname not set)
2005-01-09 Michael Koch <konqueror@gmx.de> PR libgcj/17069 * java/net/InetAddress.java (getLocalHost): Throw UnknownHostException if local hostname cannot be determined. From-SVN: r93115
This commit is contained in:
parent
5a3ed97adb
commit
a34664c6ba
|
@ -1,3 +1,9 @@
|
||||||
|
2005-01-09 Michael Koch <konqueror@gmx.de>
|
||||||
|
|
||||||
|
PR libgcj/17069
|
||||||
|
* java/net/InetAddress.java (getLocalHost):
|
||||||
|
Throw UnknownHostException if local hostname cannot be determined.
|
||||||
|
|
||||||
2005-01-06 Tom Tromey <tromey@redhat.com>
|
2005-01-06 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* java/lang/ClassLoader.java (findClass): Fixed documentation.
|
* java/lang/ClassLoader.java (findClass): Fixed documentation.
|
||||||
|
|
|
@ -714,7 +714,7 @@ public class InetAddress implements Serializable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostname != null)
|
if (hostname != null && hostname.length() != 0)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -725,6 +725,8 @@ public class InetAddress implements Serializable
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
throw new UnknownHostException();
|
||||||
|
|
||||||
if (localhost == null)
|
if (localhost == null)
|
||||||
localhost = new InetAddress (loopbackAddress, "localhost");
|
localhost = new InetAddress (loopbackAddress, "localhost");
|
||||||
|
|
Loading…
Reference in New Issue