* java/nio/channels/spi/AbstractInterruptibleChannel.java
(opened): Removed.
(closed): New field.
(close): Check of channel is closed already.
(isOpen): Return !closed.
From-SVN: r74182
+2003-12-02 Michael Koch <konqueror@gmx.de>
+
+ * java/nio/channels/spi/AbstractInterruptibleChannel.java
+ (opened): Removed.
+ (closed): New field.
+ (close): Check of channel is closed already.
+ (isOpen): Return !closed.
+
2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/DatagramChannelImpl.java
public abstract class AbstractInterruptibleChannel
implements Channel, InterruptibleChannel
{
- boolean opened = true;
+ private boolean closed;
/**
* Initializes the channel.
*/
public final void close () throws IOException
{
- opened = false;
- implCloseChannel ();
+ if (!closed)
+ {
+ implCloseChannel();
+ closed = true;
+ }
}
/**
*/
public final boolean isOpen ()
{
- return opened;
+ return !closed;
}
}