From 93a8f49bfad3672fa3ae104b5ff9f086652794e1 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Mon, 2 Oct 2006 10:54:43 +0000 Subject: [PATCH] 2006-10-02 Gary Benson * java/net/InetAddress.java (checkConnect): Reinstated. (loopbackAddress): Ensure initialized from non-null object. From-SVN: r117370 --- libjava/ChangeLog | 6 ++++++ libjava/java/net/InetAddress.java | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 177ac48d295c..21cbc61d0131 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2006-10-02 Gary Benson + + * java/net/InetAddress.java + (checkConnect): Reinstated. + (loopbackAddress): Ensure initialized from non-null object. + 2006-09-30 Keith Seitz * include/java-interp.h (prepared): Change type to pc_t. diff --git a/libjava/java/net/InetAddress.java b/libjava/java/net/InetAddress.java index bef9a6ecf19a..06e9658fbf6b 100644 --- a/libjava/java/net/InetAddress.java +++ b/libjava/java/net/InetAddress.java @@ -101,6 +101,8 @@ public class InetAddress implements Serializable try { LOCALHOST = getByAddress("localhost", new byte[] {127, 0, 0, 1}); + // Some soon-to-be-removed native code synchronizes on this. + loopbackAddress = LOCALHOST; } catch (UnknownHostException e) { @@ -793,7 +795,7 @@ public class InetAddress implements Serializable static native String getLocalHostname(); // Some soon-to-be-removed native code synchronizes on this. - static InetAddress loopbackAddress = LOCALHOST; + static InetAddress loopbackAddress; // Some soon-to-be-removed code uses this old and broken method. InetAddress(byte[] ipaddr, String hostname) @@ -805,9 +807,13 @@ public class InetAddress implements Serializable family = getFamily(ipaddr); } - // Some soon-to-be-removed native code uses this old method. + // Some soon-to-be-removed native code uses these old methods. private static InetAddress[] allocArray (int count) { return new InetAddress [count]; } + private static SecurityException checkConnect (String hostname) + { + return null; + } } -- 2.47.2