From 484fe3bff87b2285ae4ae70047fa9cb76d64ee7e Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Thu, 2 Oct 2003 15:17:13 +0000 Subject: 2003-10-02 Michael Koch * 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 --- libjava/java/net/ServerSocket.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'libjava/java/net/ServerSocket.java') diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java index 4428178..6b5544b 100644 --- a/libjava/java/net/ServerSocket.java +++ b/libjava/java/net/ServerSocket.java @@ -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 (); -- cgit v1.1