aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net/ServerSocket.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2002-11-20 16:19:08 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2002-11-20 16:19:08 +0000
commit3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa (patch)
tree79f607cf0830a31df050e0c63c02b22944c84a26 /libjava/java/net/ServerSocket.java
parente6226a2f87a75d3daf21896affc0857a94d5d4ac (diff)
downloadgcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.zip
gcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.tar.gz
gcc-3ebb998e6fd4db2150c4c60f0977b2b4ca3d39fa.tar.bz2
2002-11-20 Michael Koch <konqueror@gmx.de>
* java/io/FileInputStream.java (getChannel): New method. * java/io/FileOutputStream.java (getChannel): New method. * java/net/ServerSocket.java (bind): Removed duplicate code and called another bind method instead. * java/nio/channels/SelectionKey.java (isValid): Removed wrong exception documentation. * java/nio/channels/ServerSocketChannel.java (accept): Added exception documentation. (open): Fixed typo, added exception documentation. * java/nio/channels/spi/AbstractSelectableChannel.java (implCloseChannel): Added exception documentation. (add): Reformated. (register): Added exception documentation. From-SVN: r59307
Diffstat (limited to 'libjava/java/net/ServerSocket.java')
-rw-r--r--libjava/java/net/ServerSocket.java15
1 files changed, 2 insertions, 13 deletions
diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java
index dda834e..62917b6 100644
--- a/libjava/java/net/ServerSocket.java
+++ b/libjava/java/net/ServerSocket.java
@@ -151,6 +151,7 @@ public class ServerSocket
throws IOException
{
this();
+
if (impl == null)
throw new IOException("Cannot initialize Socket implementation");
@@ -181,19 +182,7 @@ public class ServerSocket
public void bind (SocketAddress endpoint)
throws IOException
{
- if (impl == null)
- throw new IOException ("Cannot initialize Socket implementation");
-
- if (! (endpoint instanceof InetSocketAddress))
- throw new IllegalArgumentException ("Address type not supported");
-
- InetSocketAddress tmp = (InetSocketAddress) endpoint;
-
- SecurityManager s = System.getSecurityManager ();
- if (s != null)
- s.checkListen (tmp.getPort ());
-
- impl.bind (tmp.getAddress (), tmp.getPort ());
+ bind (endpoint, 50);
}
/**