Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 64759200B3E for ; Wed, 7 Sep 2016 21:27:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 63559160AC1; Wed, 7 Sep 2016 19:27:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AA05D160ABF for ; Wed, 7 Sep 2016 21:27:12 +0200 (CEST) Received: (qmail 75297 invoked by uid 500); 7 Sep 2016 19:27:08 -0000 Mailing-List: contact commits-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pdfbox.apache.org Delivered-To: mailing list commits@pdfbox.apache.org Received: (qmail 75229 invoked by uid 99); 7 Sep 2016 19:27:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Sep 2016 19:27:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 5E720C6F33 for ; Wed, 7 Sep 2016 19:27:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.676 X-Spam-Level: X-Spam-Status: No, score=0.676 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.124] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fhqy0FZJWcwe for ; Wed, 7 Sep 2016 19:27:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A4E235FB33 for ; Wed, 7 Sep 2016 19:27:07 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 27718E0099 for ; Wed, 7 Sep 2016 19:27:07 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 22B883A0249 for ; Wed, 7 Sep 2016 19:27:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1759670 - in /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox: cos/COSArray.java pdmodel/common/COSArrayList.java Date: Wed, 07 Sep 2016 19:27:07 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160907192707.22B883A0249@svn01-us-west.apache.org> archived-at: Wed, 07 Sep 2016 19:27:13 -0000 Author: tilman Date: Wed Sep 7 19:27:06 2016 New Revision: 1759670 URL: http://svn.apache.org/viewvc?rev=1759670&view=rev Log: PDFBOX-2852: user foreach loop, as suggested by Simon Steiner Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/common/COSArrayList.java Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java?rev=1759670&r1=1759669&r2=1759670&view=diff ============================================================================== --- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java (original) +++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSArray.java Wed Sep 7 19:27:06 2016 @@ -550,9 +550,9 @@ public class COSArray extends COSBase im public void setFloatArray( float[] value ) { this.clear(); - for( int i=0; i implements else { array = new COSArray(); - Iterator iter = cosObjectableList.iterator(); - while( iter.hasNext() ) + for (Object next : cosObjectableList) { - Object next = iter.next(); if( next instanceof String ) { array.add( new COSString( (String)next ) ); @@ -468,10 +466,8 @@ public class COSArrayList implements private List toCOSObjectList( Collection list ) { List cosObjects = new ArrayList(); - Iterator iter = list.iterator(); - while( iter.hasNext() ) + for (Object next : list) { - Object next = iter.next(); if( next instanceof String ) { cosObjects.add( new COSString( (String)next ) );