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 DBE12200C1F for ; Sat, 18 Feb 2017 14:51:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id DA6DA160B66; Sat, 18 Feb 2017 13:51:25 +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 55F65160B63 for ; Sat, 18 Feb 2017 14:51:25 +0100 (CET) Received: (qmail 59803 invoked by uid 500); 18 Feb 2017 13:51:24 -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 59794 invoked by uid 99); 18 Feb 2017 13:51:24 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2017 13:51:24 +0000 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 DCCEC3A090E for ; Sat, 18 Feb 2017 13:51:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1783546 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java Date: Sat, 18 Feb 2017 13:51:23 -0000 To: commits@pdfbox.apache.org From: tilman@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170218135123.DCCEC3A090E@svn01-us-west.apache.org> archived-at: Sat, 18 Feb 2017 13:51:26 -0000 Author: tilman Date: Sat Feb 18 13:51:23 2017 New Revision: 1783546 URL: http://svn.apache.org/viewvc?rev=1783546&view=rev Log: PDFBOX-2852: sonar fix: add an end condition to this loop Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java?rev=1783546&r1=1783545&r2=1783546&view=diff ============================================================================== --- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java (original) +++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type4ShadingContext.java Sat Feb 18 13:51:23 2017 @@ -94,7 +94,8 @@ class Type4ShadingContext extends Gourau LOG.error(ex); } - while (true) + boolean eof = false; + while (!eof) { Vertex p0, p1, p2; Point2D[] ps; @@ -155,7 +156,7 @@ class Type4ShadingContext extends Gourau } catch (EOFException ex) { - break; + eof = true; } } }