[ 
https://issues.apache.org/jira/browse/PDFBOX-2769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-2769:
------------------------------------
    Fix Version/s: 1.8.10

> NPE when saving encrypted file
> ------------------------------
>
>                 Key: PDFBOX-2769
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2769
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Crypto, Writing
>    Affects Versions: 1.8.9, 1.8.10, 2.0.0
>            Reporter: Tilman Hausherr
>            Assignee: Tilman Hausherr
>             Fix For: 1.8.10, 2.0.0
>
>         Attachments: PDFBOX-2769.pdf
>
>
> Mailing list user gets this when loading and then saving an encrypted file 
> (of which he didn't know it was encrypted):
> {code}
> 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) 
> {code}
> At the very least, we should bring an IllegalStateException with a useful 
> message telling what to do.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to