Author: ggregory Date: Tue Sep 2 15:49:54 2014 New Revision: 1622039 URL: http://svn.apache.org/r1622039 Log: Convert 'for' loops to enhanced 'for' loops.
Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java?rev=1622039&r1=1622038&r2=1622039&view=diff ============================================================================== --- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java (original) +++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericKeyedObjectPool.java Tue Sep 2 15:49:54 2014 @@ -1334,13 +1334,13 @@ public class TestGenericKeyedObjectPool wtt[i] = new WaitingTestThread(pool,Integer.toString(i % keyCount),holdTime); } long origin = System.currentTimeMillis()-1000; - for(int i=0; i < wtt.length; i++){ - wtt[i].start(); + for (WaitingTestThread element : wtt) { + element.start(); } int failed = 0; - for(int i=0; i < wtt.length; i++){ - wtt[i].join(); - if (wtt[i]._thrown != null){ + for (WaitingTestThread element : wtt) { + element.join(); + if (element._thrown != null){ failed++; } } @@ -1353,8 +1353,7 @@ public class TestGenericKeyedObjectPool " Threads: " + wtt.length + " Failed: " + failed ); - for(int i=0; i < wtt.length; i++){ - WaitingTestThread wt = wtt[i]; + for (WaitingTestThread wt : wtt) { System.out.println( "Preborrow: " + (wt.preborrow-origin) + " Postborrow: " + (wt.postborrow != 0 ? wt.postborrow-origin : -1) + Modified: commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java URL: http://svn.apache.org/viewvc/commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java?rev=1622039&r1=1622038&r2=1622039&view=diff ============================================================================== --- commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java (original) +++ commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java Tue Sep 2 15:49:54 2014 @@ -2145,13 +2145,13 @@ public class TestGenericObjectPool exten wtt[i] = new WaitingTestThread(pool,holdTime); } long origin = System.currentTimeMillis()-1000; - for(int i=0; i < wtt.length; i++){ - wtt[i].start(); + for (WaitingTestThread element : wtt) { + element.start(); } int failed = 0; - for(int i=0; i < wtt.length; i++){ - wtt[i].join(); - if (wtt[i]._thrown != null){ + for (WaitingTestThread element : wtt) { + element.join(); + if (element._thrown != null){ failed++; } } @@ -2163,8 +2163,7 @@ public class TestGenericObjectPool exten " Threads: " + wtt.length + " Failed: " + failed ); - for(int i=0; i < wtt.length; i++){ - WaitingTestThread wt = wtt[i]; + for (WaitingTestThread wt : wtt) { System.out.println( "Preborrow: " + (wt.preborrow-origin) + " Postborrow: " + (wt.postborrow != 0 ? wt.postborrow-origin : -1) +