pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r907271 - /pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceDictionary.java
Date Sat, 06 Feb 2010 18:46:41 GMT
Author: lehmi
Date: Sat Feb  6 18:46:40 2010
New Revision: 907271

URL: http://svn.apache.org/viewvc?rev=907271&view=rev
Log:
PDFBOX-593: avoid a loop in the appearance dictionary causing a ClassCastException. Patch
by Johannes Koch (johannes dot koch at fit dot fraunhofer dot de)

Modified:
    pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceDictionary.java

Modified: pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceDictionary.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceDictionary.java?rev=907271&r1=907270&r2=907271&view=diff
==============================================================================
--- pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceDictionary.java
(original)
+++ pdfbox/trunk/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/PDAppearanceDictionary.java
Sat Feb  6 18:46:40 2010
@@ -149,8 +149,9 @@
         {
             if( ap instanceof COSStream )
             {
+                COSStream aux = (COSStream) ap;
                 ap = new COSDictionary();
-                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), ap );
+                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
             }
             COSDictionary map = (COSDictionary)ap;
             Map actuals = new HashMap();
@@ -199,8 +200,9 @@
         {
             if( ap instanceof COSStream )
             {
+                COSStream aux = (COSStream) ap;
                 ap = new COSDictionary();
-                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), ap );
+                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
             }
             COSDictionary map = (COSDictionary)ap;
             Map actuals = new HashMap();



Mime
View raw message