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

New NPE in PDFBox 1.8.11-rc1 in Acroform PDCheckbox's isChecked()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.11
    • 1.8.11
    • AcroForm
    • None

    Description

      I ran the comparison code for 1.8.11-rc1 against 1.8.10 and found a new NPE in ~600 files out of ~350k.

      java.lang.NullPointerException
      	at org.apache.pdfbox.pdmodel.interactive.form.PDCheckbox.isChecked(PDCheckbox.java:57)
      	at org.apache.pdfbox.pdmodel.interactive.form.PDRadioCollection.getValue(PDRadioCollection.java:128)
      	at org.apache.tika.parser.pdf.PDF2XHTML.addFieldString(PDF2XHTML.java:657)
      	at org.apache.tika.parser.pdf.PDF2XHTML.processAcroField(PDF2XHTML.java:616)
      	at org.apache.tika.parser.pdf.PDF2XHTML.extractAcroForm(PDF2XHTML.java:602)
      	at org.apache.tika.parser.pdf.PDF2XHTML.endDocument(PDF2XHTML.java:212)
      

      To replicate the problem in PrintFields:

                  outputString.append(" = " + fieldValue);
                  outputString.append(",  type=" + field.getClass().getName());
      
      +            if (field instanceof PDCheckbox)
      +            {
      +              outputString.append(" : "+((PDCheckbox)field).isChecked());
      +            }
      

      Attachments

        Issue Links

          Activity

            People

              tilman Tilman Hausherr
              tallison Tim Allison
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: