diff options
author | Gary Benson <gbenson@redhat.com> | 2006-10-03 10:27:28 +0000 |
---|---|---|
committer | Gary Benson <gary@gcc.gnu.org> | 2006-10-03 10:27:28 +0000 |
commit | 704312e73831c41151ce20d4d0dbe5803671f25e (patch) | |
tree | 3138dd1772933acacbf4bedab001fd3c1803562e /libjava | |
parent | 95fb85c625c7f820207784f4c5f2c30c3796778d (diff) | |
download | gcc-704312e73831c41151ce20d4d0dbe5803671f25e.zip gcc-704312e73831c41151ce20d4d0dbe5803671f25e.tar.gz gcc-704312e73831c41151ce20d4d0dbe5803671f25e.tar.bz2 |
2006-10-03 Gary Benson <gbenson@redhat.com>
* java/net/InetAddress.java
(<clinit>): Reorder the static initializers.
From-SVN: r117394
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 5 | ||||
-rw-r--r-- | libjava/java/net/InetAddress.java | 36 |
2 files changed, 23 insertions, 18 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 21cbc61..47a781f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2006-10-03 Gary Benson <gbenson@redhat.com> + + * java/net/InetAddress.java + (<clinit>): Reorder the static initializers. + 2006-10-02 Gary Benson <gbenson@redhat.com> * java/net/InetAddress.java diff --git a/libjava/java/net/InetAddress.java b/libjava/java/net/InetAddress.java index 06e9658..640750d 100644 --- a/libjava/java/net/InetAddress.java +++ b/libjava/java/net/InetAddress.java @@ -66,6 +66,24 @@ public class InetAddress implements Serializable private static final long serialVersionUID = 3286316764910316507L; /** + * Stores static localhost address object. + */ + static InetAddress LOCALHOST; + static + { + 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) + { + throw new RuntimeException("should never happen", e); + } + } + + /** * Dummy InetAddress, used to bind socket to any (all) network interfaces. */ static InetAddress ANY_IF; @@ -93,24 +111,6 @@ public class InetAddress implements Serializable } /** - * Stores static localhost address object. - */ - static InetAddress LOCALHOST; - static - { - 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) - { - throw new RuntimeException("should never happen", e); - } - } - - /** * The Serialized Form specifies that an int 'address' is saved/restored. * This class uses a byte array internally so we'll just do the conversion * at serialization time and leave the rest of the algorithm as is. |