File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
pdfbox/src/test/java/org/apache/pdfbox/filter Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 2828import org .apache .pdfbox .Loader ;
2929import org .apache .pdfbox .cos .COSDictionary ;
3030import org .apache .pdfbox .cos .COSName ;
31+ import org .apache .pdfbox .pdmodel .PDDocument ;
3132
3233import static org .junit .jupiter .api .Assertions .assertArrayEquals ;
34+ import static org .junit .jupiter .api .Assertions .assertEquals ;
3335import static org .junit .jupiter .api .Assertions .assertThrows ;
3436import org .junit .jupiter .api .Test ;
3537
@@ -129,8 +131,11 @@ void testFilters() throws IOException
129131 @ Test
130132 void testPDFBOX4517 () throws IOException
131133 {
132- Loader .loadPDF (new File ("target/pdfs/PDFBOX-4517-cryptfilter.pdf" ),
133- "userpassword1234" );
134+ try (PDDocument doc = Loader .loadPDF (new File ("target/pdfs/PDFBOX-4517-cryptfilter.pdf" ),
135+ "userpassword1234" ))
136+ {
137+ assertEquals (1 , doc .getNumberOfPages ());
138+ }
134139 }
135140
136141 /**
You can’t perform that action at this time.
0 commit comments