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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.11
    • Fix Version/s: 1.8.11
    • Component/s: AcroForm
    • Labels:
      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

              • Assignee:
                tilman Tilman Hausherr
                Reporter:
                tallison@mitre.org Tim Allison
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: