summaryrefslogtreecommitdiff
path: root/libjava/java/net/ServerSocket.java
diff options
context:
space:
mode:
authormkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-02 15:17:13 +0000
committermkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-02 15:17:13 +0000
commitdc4c73085b4ad2e010a734a66cb5f6b22cc56457 (patch)
tree684fb0979b64b364506bb3931e9a87d0093c77e2 /libjava/java/net/ServerSocket.java
parent21da75004be374f53c96ce5c57c60ad602c91eeb (diff)
downloadgcc-dc4c73085b4ad2e010a734a66cb5f6b22cc56457.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72032 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/net/ServerSocket.java')
-rw-r--r--libjava/java/net/ServerSocket.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java
index 44281783dc8..6b5544b3a27 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 ();