Fix build failure.
authorJeff Sturm <jsturm@one-point.com>
Fri, 26 Sep 2003 03:50:45 +0000 (03:50 +0000)
committerJeff Sturm <jsturm@gcc.gnu.org>
Fri, 26 Sep 2003 03:50:45 +0000 (03:50 +0000)
* gnu/java/nio/SelectorImpl.java (getFDsAsArray): Use getNativeFD().
(select): Likewise.
(register): Use DatagramChannelSelectionKey, SocketChannelSelectionKey.

From-SVN: r71812

libjava/ChangeLog
libjava/gnu/java/nio/SelectorImpl.java

index 70cc0c546128fb949a885904e1548ee7f3ef59c5..98ac223d343db1c9c990c971b6bb965816de8464 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-25  Jeff Sturm  <jsturm@one-point.com>
+
+       * gnu/java/nio/SelectorImpl.java (getFDsAsArray): Use getNativeFD().
+       (select): Likewise.
+       (register): Use DatagramChannelSelectionKey, SocketChannelSelectionKey.
+
 2003-09-25  Michael Koch  <konqueror@gmx.de>
 
        * gnu/java/nio/DatagramChannelImpl.java
index ea2ceda71e9f8ca412fd65bcb5e883f0f85677dc..08531ef449a4bfef0585518d09482fbc0bd48fe2 100644 (file)
@@ -125,7 +125,7 @@ public class SelectorImpl extends AbstractSelector
 
         if ((key.interestOps () & ops) != 0)
           {
-            result[counter] = key.fd;
+            result[counter] = key.getNativeFD();
             counter++;
           }
       }
@@ -172,7 +172,7 @@ public class SelectorImpl extends AbstractSelector
         // Set new ready read/accept ops
         for (int i = 0; i < read.length; i++)
           {
-            if (key.fd == read[i])
+            if (key.getNativeFD() == read[i])
               {
                 if (key.channel () instanceof ServerSocketChannelImpl)
                   {
@@ -188,7 +188,7 @@ public class SelectorImpl extends AbstractSelector
         // Set new ready write ops
         for (int i = 0; i < write.length; i++)
           {
-            if (key.fd == write[i])
+            if (key.getNativeFD() == write[i])
               {
                 ops = ops | SelectionKey.OP_WRITE;
                 
@@ -253,17 +253,17 @@ public class SelectorImpl extends AbstractSelector
     if (ch instanceof SocketChannelImpl)
       {
         SocketChannelImpl sc = (SocketChannelImpl) ch;
-        result = new SelectionKeyImpl (ch, this, 0); // FIXME: last argument
+        result = new SocketChannelSelectionKey (ch, this); // FIXME: last argument
       }
     else if (ch instanceof DatagramChannelImpl)
       {
         DatagramChannelImpl dc = (DatagramChannelImpl) ch;
-        result = new SelectionKeyImpl (ch, this, 0); // FIXME: last argument
+        result = new DatagramChannelSelectionKey (ch, this); // FIXME: last argument
       }
     else if (ch instanceof ServerSocketChannelImpl)
       {
         ServerSocketChannelImpl ssc = (ServerSocketChannelImpl) ch;
-        result = new SelectionKeyImpl (ch, this, 0); // FIXME: last argument
+        result = new SocketChannelSelectionKey (ch, this); // FIXME: last argument
       }
     else
       {