pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1644483 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java
Date Wed, 10 Dec 2014 17:09:22 GMT
Author: tilman
Date: Wed Dec 10 17:09:22 2014
New Revision: 1644483

URL: http://svn.apache.org/r1644483
Log:
PDFBOX-2550: allow indirect object and avoid ClassCastException in getColour()

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java?rev=1644483&r1=1644482&r2=1644483&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAnnotation.java
Wed Dec 10 17:09:22 2014
@@ -615,10 +615,10 @@ public abstract class PDAnnotation imple
      */
     public PDGamma getColour()
     {
-        COSArray c = (COSArray) getDictionary().getItem(COSName.C);
-        if (c != null)
+        COSBase obj = getDictionary().getDictionaryObject(COSName.C);
+        if (obj instanceof COSArray)
         {
-            return new PDGamma(c);
+            return new PDGamma((COSArray) obj);
         }
         else
         {



Mime
View raw message