harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r588319 - /harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectableChannel.java
Date Thu, 25 Oct 2007 19:33:38 GMT
Author: tellison
Date: Thu Oct 25 12:33:38 2007
New Revision: 588319

URL: http://svn.apache.org/viewvc?rev=588319&view=rev
Log:
Apply patch for HARMONY-5025 ([classlib][nio] make AbstractSelectableChannel.containsValidKeys()
a little bit faster)

Modified:
    harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectableChannel.java

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectableChannel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectableChannel.java?rev=588319&r1=588318&r2=588319&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectableChannel.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/java/common/java/nio/channels/spi/AbstractSelectableChannel.java
Thu Oct 25 12:33:38 2007
@@ -238,12 +238,12 @@
     }
 
     /**
-     * Returns true if the keyList contains at least 1 valid key and false otherwise.
+     * Returns true if the keyList contains at least 1 valid key and false
+     * otherwise.
      */
     private synchronized boolean containsValidKeys() {
-        for (Iterator<SelectionKey> iter = keyList.iterator(); iter.hasNext();) {
-            SelectionKey key = iter.next();
-
+        for (int i = 0; i < keyList.size(); i++) {
+            SelectionKey key = keyList.get(i);
             if (key != null && key.isValid()) {
                 return true;
             }



Mime
View raw message