pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1639896 - /pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java
Date Sat, 15 Nov 2014 14:56:59 GMT
Author: tilman
Date: Sat Nov 15 14:56:58 2014
New Revision: 1639896

URL: http://svn.apache.org/r1639896
Log:
PDFBOX-2500: allow indirect object for filters

Modified:
    pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java

Modified: pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java?rev=1639896&r1=1639895&r2=1639896&view=diff
==============================================================================
--- pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java
(original)
+++ pdfbox/trunk/preflight/src/main/java/org/apache/pdfbox/preflight/process/StreamValidationProcess.java
Sat Nov 15 14:56:58 2014
@@ -49,6 +49,7 @@ import org.apache.pdfbox.preflight.utils
 public class StreamValidationProcess extends AbstractProcess
 {
 
+    @Override
     public void validate(PreflightContext ctx) throws ValidationException
     {
         PDDocument pdfDoc = ctx.getDocument();
@@ -92,7 +93,7 @@ public class StreamValidationProcess ext
      */
     protected void checkFilters(COSStream stream, PreflightContext context)
     {
-        COSBase bFilter = stream.getItem(COSName.FILTER);
+        COSBase bFilter = stream.getDictionaryObject(COSName.FILTER);
         if (bFilter != null)
         {
             COSDocument cosDocument = context.getDocument().getDocument();
@@ -250,7 +251,7 @@ public class StreamValidationProcess ext
 
                     do
                     {
-                        int cr = 0;
+                        int cr;
                         if (nbBytesToRead > 1024)
                         {
                             cr = ra.read(buffer, 0, 1024);



Mime
View raw message