2003-10-02 Michael Koch <konqueror@gmx.de>

* java/net/InetAddress.java
	(zeros): Removed.
	(ANY_IF): Initalizie in static block.
	(static): Load library with native methods here and initialize ANY_IF.
	(isAnyLocalAddress): Check if equal to ANY_IF.
	(equals): Use addr directly instead of addr1. Simplify for loop.
	(toString): Rename "result" to "host" and add IP address allways.
	(getLocalHost): Merged documentation from classpath.
	* java/net/ServerSocket.java
	(ServerSocket): New package-private constructor used by java.nio.
	* java/net/URLConnection.java
	(getRequestProperties): Check if already connected.

From-SVN: r72032
This commit is contained in:
Michael Koch 2003-10-02 15:17:13 +00:00 committed by Michael Koch
parent b97e92ed3a
commit 484fe3bff8
4 changed files with 60 additions and 18 deletions

View file

@ -74,6 +74,17 @@ public class ServerSocket
private SocketImpl impl;
private boolean closed = false;
/*
* This is only used by java.nio.
*/
// FIXME: Workaround a bug in gcj.
//ServerSocket (PlainSocketImpl impl) throws IOException
ServerSocket (SocketImpl impl) throws IOException
{
this.impl = impl;
this.impl.create (true);
}
/**
* Constructor that simply sets the implementation.
@ -318,8 +329,7 @@ public class ServerSocket
*/
public void close () throws IOException
{
if (impl != null)
impl.close ();
impl.close ();
if (getChannel() != null)
getChannel().close ();