[ 
https://issues.apache.org/jira/browse/PDFBOX-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879528#action_12879528
 ] 

Andreas Lehmkühler commented on PDFBOX-743:
-------------------------------------------

As we have a lazy consensus about making PDFBox more lenient if it comes to 
read malformed pdfs, I suggest to include phillips proposed changes.

> PDAppereanceDictionary#getNormalAppearance might throw NPE
> ----------------------------------------------------------
>
>                 Key: PDFBOX-743
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-743
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.1.0
>            Reporter: Philipp Koch
>             Fix For: 1.2.0
>
>
> following code patch will ensure that no NPE is thrown. the question is if 
> the check for NULL is done at the correct place (functionally yes) 
> respectively is it correct to apply the default configuration setting for 
> that case?
> @@ -85,7 +85,7 @@
>      public Map getNormalAppearance()
>      {
>          COSBase ap = dictionary.getDictionaryObject( COSName.getPDFName( "N" 
> ) );
> -        if( ap instanceof COSStream )
> +        if( ap instanceof COSStream || ap == null)
>          {
>              COSStream aux = (COSStream) ap;
>              ap = new COSDictionary();

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to