Details
Description
I am getting a NullPointerException thrown from PDField.java line 540. The problem is that the code calls COSArray.getObject on line 539, which can return a NULL. Line 540 uses the returned value without first checking for NULL, thus throwing NPE when the value is NULL. The following is the stack trace:
java.lang.NullPointerException
at org.apache.pdfbox.pdmodel.interactive.form.PDField.getKids(PDField.java:540)
at org.apache.pdfbox.pdmodel.interactive.form.PDFieldFactory.isButton(PDFieldFactory.java:159)
at org.apache.pdfbox.pdmodel.interactive.form.PDFieldFactory.createField(PDFieldFactory.java:68)
at org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm.getFields(PDAcroForm.java:203)
...