Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.9, 1.8.10, 2.0.0
-
None
Description
Mailing list user gets this when loading and then saving an encrypted file (of which he didn't know it was encrypted):
java.lang.NullPointerException at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.computeRevisionNumber(StandardSecurityHandler.java:129) at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareDocumentForEncryption(StandardSecurityHandler.java:332) at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1254) at org.apache.pdfbox.pdfwriter.COSWriter.write(COSWriter.java:1215) at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:958) at org.apache.pdfbox.pdmodel.PDDocument.save(PDDocument.java:930)
At the very least, we should bring an IllegalStateException with a useful message telling what to do.