You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2010/06/21 15:13:23 UTC

[jira] Resolved: (PDFBOX-743) PDAppereanceDictionary#getNormalAppearance might throw NPE

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

Jukka Zitting resolved PDFBOX-743.
----------------------------------

    Resolution: Fixed

Agreed about being more lenient in what we accept. I committed Philipp's changes in revision 956566. Resolving as fixed.

> 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.