pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1858698 - in /pdfbox/branches/2.0/pdfbox: ./ pom.xml src/test/java/org/apache/pdfbox/filter/TestFilters.java
Date Sun, 05 May 2019 17:31:21 GMT
Author: lehmi
Date: Sun May  5 17:31:21 2019
New Revision: 1858698

URL: http://svn.apache.org/viewvc?rev=1858698&view=rev
Log:
PDFBOX-4517: added test for identity filter as proposed by Jerome Joslet

Modified:
    pdfbox/branches/2.0/pdfbox/   (props changed)
    pdfbox/branches/2.0/pdfbox/pom.xml
    pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java

Propchange: pdfbox/branches/2.0/pdfbox/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun May  5 17:31:21 2019
@@ -1,3 +1,3 @@
 /pdfbox/branches/no-awt/pdfbox:1618517-1621410
 /pdfbox/no-awt/pdfbox:1618514-1618516
-/pdfbox/trunk/pdfbox:1736223,1736227,1736615,1737043,1737130,1737599-1737600,1738755,1740160,1742437,1742442,1743248,1745595,1745606,1745772,1745774,1745776,1745779,1746032,1746151,1749162,1749165,1749432,1757165,1758817,1767585,1770988,1772528,1778172,1782679,1786586,1786603,1787546,1789414,1790745,1794073,1794090,1794620,1794753,1794859,1794891,1812426,1814226,1826836,1857800,1857803,1857914
+/pdfbox/trunk/pdfbox:1736223,1736227,1736615,1737043,1737130,1737599-1737600,1738755,1740160,1742437,1742442,1743248,1745595,1745606,1745772,1745774,1745776,1745779,1746032,1746151,1749162,1749165,1749432,1757165,1758817,1767585,1768061,1770988,1772528,1778172,1782679,1786586,1786603,1787546,1789414,1790745,1794073,1794090,1794620,1794753,1794859,1794891,1812426,1814226,1826836,1857800,1857803,1857914

Modified: pdfbox/branches/2.0/pdfbox/pom.xml
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/pom.xml?rev=1858698&r1=1858697&r2=1858698&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/pom.xml (original)
+++ pdfbox/branches/2.0/pdfbox/pom.xml Sun May  5 17:31:21 2019
@@ -634,6 +634,19 @@
                             <sha512>42a61d0061b0b3b0bcc92c9f3ddc78daca79e9d5ea56c19796270316fb7cf3858db9f51efafa3776e1fef17f85202b35c8eed0e88ba6b7ebc7bb05c6014b9fc8</sha512>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>PDFBOX-4517</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>wget</goal>
+                        </goals>
+                        <configuration>
+                            <url>https://issues.apache.org/jira/secure/attachment/12966453/cryptfilter.pdf</url>
+                            <outputDirectory>${project.build.directory}/pdfs</outputDirectory>
+                            <outputFileName>PDFBOX-4517-cryptfilter.pdf</outputFileName>
+                            <sha512>ed55a65bad6f91104846d28e9e7dcb18b11efbf980a74781350551428bbaecba375d9e22af02edf0f91263c7f668e93ec7c52d397898b7640c2d60e7dd3ae940</sha512>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
         </plugins>

Modified: pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java?rev=1858698&r1=1858697&r2=1858698&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/test/java/org/apache/pdfbox/filter/TestFilters.java Sun
May  5 17:31:21 2019
@@ -18,6 +18,7 @@ package org.apache.pdfbox.filter;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Random;
@@ -27,6 +28,7 @@ import junit.framework.TestCase;
 import org.apache.pdfbox.cos.COSDictionary;
 import org.apache.pdfbox.cos.COSName;
 import org.apache.pdfbox.io.IOUtils;
+import org.apache.pdfbox.pdmodel.PDDocument;
 
 /**
  * This will test all of the filters in the PDFBox system.
@@ -115,6 +117,17 @@ public class TestFilters extends TestCas
         }
     }
     
+    /**
+     * This will test the use of identity filter to decode stream and string.
+     * This test threw an IOException before the correction.
+     * 
+     * @throws IOException
+     */
+    public void testPDFBOX4517() throws IOException
+    {
+        PDDocument.load(new File("target/pdfs/PDFBOX-4517-cryptfilter.pdf"),
+                "userpassword1234");
+    }
 
     /**
      * This will test the LZW filter with the sequence that failed in PDFBOX-1777.



Mime
View raw message