pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jahew...@apache.org
Subject svn commit: r1571973 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorSpace.java
Date Wed, 26 Feb 2014 09:20:42 GMT
Author: jahewson
Date: Wed Feb 26 09:20:42 2014
New Revision: 1571973

URL: http://svn.apache.org/r1571973
Log:
PDFBOX-1942: Regression: java.lang.IndexOutOfBoundsException in shading

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorSpace.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorSpace.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorSpace.java?rev=1571973&r1=1571972&r2=1571973&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorSpace.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/color/PDColorSpace.java
Wed Feb 26 09:20:42 2014
@@ -137,7 +137,14 @@ public abstract class PDColorSpace imple
             }
             else if (name == COSName.PATTERN)
             {
-                return new PDPattern(patterns, PDColorSpace.create(array.get(1)));
+                if (array.size() == 1)
+                {
+                    return new PDPattern(patterns);
+                }
+                else
+                {
+                    return new PDPattern(patterns, PDColorSpace.create(array.get(1)));
+                }
             }
             else
             {



Mime
View raw message