This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
FYI: Patch: gnu.java.nio
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Thu, 5 Feb 2004 17:03:32 +0100
- Subject: FYI: Patch: gnu.java.nio
Hi list,
I just commited the attached patch to trunk and branch two fix a bug and
a minor issue in java NIO.
Michael
2004-02-05 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/NIOServerSocket.java
(impl): Unused, removed.
* gnu/java/nio/SocketChannelImpl.java
(finnishConnect): Don't throw NoConnectionPendingException if not
connected or no connection pending.
Index: gnu/java/nio/NIOServerSocket.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/NIOServerSocket.java,v
retrieving revision 1.1
diff -u -b -B -r1.1 NIOServerSocket.java
--- gnu/java/nio/NIOServerSocket.java 11 Oct 2003 18:01:35 -0000 1.1
+++ gnu/java/nio/NIOServerSocket.java 5 Feb 2004 15:50:21 -0000
@@ -1,5 +1,5 @@
/* NIOServerSocket.java --
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -50,7 +50,6 @@
*/
public final class NIOServerSocket extends ServerSocket
{
- private PlainSocketImpl impl;
private ServerSocketChannelImpl channel;
protected NIOServerSocket (ServerSocketChannelImpl channel)
Index: gnu/java/nio/SocketChannelImpl.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/java/nio/SocketChannelImpl.java,v
retrieving revision 1.17
diff -u -b -B -r1.17 SocketChannelImpl.java
--- gnu/java/nio/SocketChannelImpl.java 3 Feb 2004 16:07:24 -0000 1.17
+++ gnu/java/nio/SocketChannelImpl.java 5 Feb 2004 15:50:21 -0000
@@ -174,7 +174,7 @@
if (!isOpen())
throw new ClosedChannelException();
- if (!connectionPending)
+ if (!isConnected() && !connectionPending)
throw new NoConnectionPendingException();
if (isConnected())