diff options
| author | Michael Koch <konqueror@gmx.de> | 2004-12-01 20:50:24 +0000 |
|---|---|---|
| committer | Michael Koch <konqueror@gmx.de> | 2004-12-01 20:50:24 +0000 |
| commit | b39837293f710af950b08b0fa24b5a998c62df34 (patch) | |
| tree | 370aaa8fd8d6e098237a4e8d650b1b38d080ba87 /gnu/java/nio/SelectorImpl.java | |
| parent | 9979155aae7247643fa1477bc08ac5ba2cdcc10e (diff) | |
| download | classpath-b39837293f710af950b08b0fa24b5a998c62df34.tar.gz | |
2004-12-01 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/SelectorImpl.java
(register): Removed redundant code.
Diffstat (limited to 'gnu/java/nio/SelectorImpl.java')
| -rw-r--r-- | gnu/java/nio/SelectorImpl.java | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/gnu/java/nio/SelectorImpl.java b/gnu/java/nio/SelectorImpl.java index 62d066246..c30c3e2cd 100644 --- a/gnu/java/nio/SelectorImpl.java +++ b/gnu/java/nio/SelectorImpl.java @@ -1,5 +1,5 @@ /* SelectorImpl.java -- - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -35,8 +35,11 @@ this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package gnu.java.nio; +import gnu.classpath.Configuration; + import java.io.IOException; import java.nio.channels.ClosedSelectorException; import java.nio.channels.SelectableChannel; @@ -49,11 +52,9 @@ import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.Set; -import gnu.classpath.Configuration; public class SelectorImpl extends AbstractSelector { - private Set keys; private Set selected; @@ -375,24 +376,13 @@ public class SelectorImpl extends AbstractSelector SelectionKeyImpl result; if (ch instanceof SocketChannelImpl) - { - SocketChannelImpl sc = (SocketChannelImpl) ch; - result = new SocketChannelSelectionKey (ch, this); - } + result = new SocketChannelSelectionKey (ch, this); else if (ch instanceof DatagramChannelImpl) - { - DatagramChannelImpl dc = (DatagramChannelImpl) ch; - result = new DatagramChannelSelectionKey (ch, this); - } + result = new DatagramChannelSelectionKey (ch, this); else if (ch instanceof ServerSocketChannelImpl) - { - ServerSocketChannelImpl ssc = (ServerSocketChannelImpl) ch; - result = new ServerSocketChannelSelectionKey (ch, this); - } + result = new ServerSocketChannelSelectionKey (ch, this); else - { - throw new InternalError ("No known channel type"); - } + throw new InternalError ("No known channel type"); synchronized (keys) { |
