Author: tilman
Date: Tue Feb 13 17:26:32 2018
New Revision: 1824161

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

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java?rev=1824161&r1=1824160&r2=1824161&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java 
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/cos/COSStream.java Tue 
Feb 13 17:26:32 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.
         }
     }
 


Reply via email to