Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-743

PDAppereanceDictionary#getNormalAppearance might throw NPE

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: PDModel
    • Labels:
      None

      Description

      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();

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pkoch Philipp Koch

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment