2006-10-03 Gary Benson <gbenson@redhat.com>
* java/net/InetAddress.java (<clinit>): Reorder the static initializers. From-SVN: r117394
This commit is contained in:
parent
95fb85c625
commit
704312e738
|
@ -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>
|
2006-10-02 Gary Benson <gbenson@redhat.com>
|
||||||
|
|
||||||
* java/net/InetAddress.java
|
* java/net/InetAddress.java
|
||||||
|
|
|
@ -65,6 +65,24 @@ public class InetAddress implements Serializable
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 3286316764910316507L;
|
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.
|
* Dummy InetAddress, used to bind socket to any (all) network interfaces.
|
||||||
*/
|
*/
|
||||||
|
@ -92,24 +110,6 @@ public class InetAddress implements Serializable
|
||||||
ANY_IF.hostName = ANY_IF.getHostName();
|
ANY_IF.hostName = ANY_IF.getHostName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 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.
|
* 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
|
* This class uses a byte array internally so we'll just do the conversion
|
||||||
|
|
Loading…
Reference in New Issue