This is related to
PDFBOX-1719. The workaround made there calls PDAcroForm.setFields with an empty list when the acro form has no fields:
This doesn't work anymore because PDAcroFrom.getFields never returns null in the current version, instead it returns an empty list and a NPE raises in line 295.
The source of the problem seems to be that the PDAcroForm's dictionary's COSName.FIELDS field contains null instead of an empty array. An empty array is implicitly created when calling PDAcroForm.setFields with an empty list. The PDAcroForm(PDDocument) constructor also sets an empty COSArray for the field. You could also do this in the second constrcutor, that would fix the error: