diff options
author | Michael Koch <konqueror@gmx.de> | 2003-10-02 15:17:13 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-10-02 15:17:13 +0000 |
commit | 484fe3bff87b2285ae4ae70047fa9cb76d64ee7e (patch) | |
tree | 684fb0979b64b364506bb3931e9a87d0093c77e2 /libjava/java/net/ServerSocket.java | |
parent | b97e92ed3a4dd394c2d764c3a78264f43050a35e (diff) | |
download | gcc-484fe3bff87b2285ae4ae70047fa9cb76d64ee7e.zip gcc-484fe3bff87b2285ae4ae70047fa9cb76d64ee7e.tar.gz gcc-484fe3bff87b2285ae4ae70047fa9cb76d64ee7e.tar.bz2 |
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
Diffstat (limited to 'libjava/java/net/ServerSocket.java')
-rw-r--r-- | libjava/java/net/ServerSocket.java | 14 |
1 files changed, 12 insertions, 2 deletions
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 (); |