diff options
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 (); |