Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C9FBE1139B for ; Tue, 2 Sep 2014 15:50:19 +0000 (UTC) Received: (qmail 24251 invoked by uid 500); 2 Sep 2014 15:50:19 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 24173 invoked by uid 500); 2 Sep 2014 15:50:19 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 24164 invoked by uid 99); 2 Sep 2014 15:50:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2014 15:50:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Sep 2014 15:49:57 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4D23E23888A6; Tue, 2 Sep 2014 15:49:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1622039 - in /commons/proper/pool/trunk/src/test/java/org/apache/commons/pool2/impl: TestGenericKeyedObjectPool.java TestGenericObjectPool.java Date: Tue, 02 Sep 2014 15:49:55 -0000 To: commits@commons.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140902154955.4D23E23888A6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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) +