You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tim Allison (JIRA)" <ji...@apache.org> on 2016/01/13 15:03:39 UTC
[jira] [Created] (PDFBOX-3193) New NPE in PDFBox 1.8.11-rc1 in
Acroform PDCheckbox's isChecked()
Tim Allison created PDFBOX-3193:
-----------------------------------
Summary: New NPE in PDFBox 1.8.11-rc1 in Acroform PDCheckbox's isChecked()
Key: PDFBOX-3193
URL: https://issues.apache.org/jira/browse/PDFBOX-3193
Project: PDFBox
Issue Type: Bug
Components: AcroForm
Reporter: Tim Allison
Attachments: V3IGGI6B2VFQVMOGSUVY7PXK4J7VV7X7
I ran the comparison code for 1.8.11-rc1 against 1.8.10 and found a new NPE in ~400 files out of ~350k.
{noformat}
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)
{noformat}
To replicate the problem in PrintFields:
{noformat}
outputString.append(" = " + fieldValue);
outputString.append(", type=" + field.getClass().getName());
+ if (field instanceof PDCheckbox) {
+ outputString.append(" : "+((PDCheckbox)field).isChecked());
+ }
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org