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

PDAppereanceDictionary#getNormalAppearance might throw NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.2.0
    • PDModel
    • 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

            Unassigned Unassigned
            pkoch Philipp Koch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: