pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r991629 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
Date Wed, 01 Sep 2010 18:05:02 GMT
Author: adam
Date: Wed Sep  1 18:05:02 2010
New Revision: 991629

URL: http://svn.apache.org/viewvc?rev=991629&view=rev
Log:
PDFBOX-796: Objects from streams overwrite objects already read with the same ID/Generation

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java?rev=991629&r1=991628&r2=991629&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSDocument.java Wed Sep  1 18:05:02
2010
@@ -450,7 +450,7 @@ public class COSDocument extends COSBase
             for( COSObject next : parser.getObjects() )
             {
                 COSObjectKey key = new COSObjectKey( next );
-                if(objectPool.get(key) == null)
+                if(objectPool.get(key) == null || objectPool.get(key).getObject() == null)
                 {
                     COSObject obj = getObjectFromPool(key);
                     obj.setObject(next.getObject());



Mime
View raw message