pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
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 GMT
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;
                 }
             }
         }



Mime
View raw message