diff options
Diffstat (limited to 'libjava/classpath/gnu/java/nio/SocketChannelSelectionKeyImpl.java')
-rw-r--r-- | libjava/classpath/gnu/java/nio/SocketChannelSelectionKeyImpl.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libjava/classpath/gnu/java/nio/SocketChannelSelectionKeyImpl.java b/libjava/classpath/gnu/java/nio/SocketChannelSelectionKeyImpl.java index 30fb2dfba44..31a96ed7d88 100644 --- a/libjava/classpath/gnu/java/nio/SocketChannelSelectionKeyImpl.java +++ b/libjava/classpath/gnu/java/nio/SocketChannelSelectionKeyImpl.java @@ -38,6 +38,8 @@ exception statement from your version. */ package gnu.java.nio; +import java.io.IOException; + /** * @author Michael Barker <mike@middlesoft.co.uk> @@ -63,7 +65,14 @@ public class SocketChannelSelectionKeyImpl extends SelectionKeyImpl */ public int getNativeFD() { - return ch.getPlainSocketImpl().getNativeFD(); + try + { + return ch.getVMChannel().getState().getNativeFD(); + } + catch (IOException ioe) + { + return 0; // FIXME + } } } |