diff options
author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-20 16:19:08 +0000 |
---|---|---|
committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-20 16:19:08 +0000 |
commit | f851ffbfdbf05aefe9acc61f2645a3318e3c201c (patch) | |
tree | 79f607cf0830a31df050e0c63c02b22944c84a26 /libjava/java/net/ServerSocket.java | |
parent | 0753f1b5364c4fe7169b9a836b0bc365ffd31300 (diff) | |
download | gcc-f851ffbfdbf05aefe9acc61f2645a3318e3c201c.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59307 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/net/ServerSocket.java')
-rw-r--r-- | libjava/java/net/ServerSocket.java | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/libjava/java/net/ServerSocket.java b/libjava/java/net/ServerSocket.java index dda834e5f98..62917b6a8a5 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); } /** |