You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2018/02/13 17:26:37 UTC

svn commit: r1824162 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java

Author: tilman
Date: Tue Feb 13 17:26:37 2018
New Revision: 1824162

URL: http://svn.apache.org/viewvc?rev=1824162&view=rev
Log:
PDFBOX-4071: add debugging hint

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java?rev=1824162&r1=1824161&r2=1824162&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java Tue Feb 13 17:26:37 2018
@@ -77,10 +77,12 @@ public class COSStream extends COSDictio
      */
     private void checkClosed() throws IOException
     {
-        if ((randomAccess != null) && randomAccess.isClosed())
+        if (randomAccess != null && randomAccess.isClosed())
         {
             throw new IOException("COSStream has been closed and cannot be read. " +
                                   "Perhaps its enclosing PDDocument has been closed?");
+            // Tip for debugging: look at the destination file with an editor, you'll see an 
+            // incomplete stream at the bottom.
         }
     }