Created attachment 21963 [details] patch file with nullity check ListLevel.toByteArray() fails with a NullPointerException with OpenOffice.org files that have Lists with no text saved using the MS Word 97 (doc) file format. Exception in thread "main" java.lang.NullPointerException at org.apache.poi.hwpf.model.ListLevel.toByteArray(ListLevel.java:228) at org.apache.poi.hwpf.model.ListTables.writeListDataTo(ListTables.java:133) at org.apache.poi.hwpf.HWPFDocument.write(HWPFDocument.java:392) at DocumentFiller.saveFile(DocumentFiller.java:228) at DocumentFiller.fillDocument(DocumentFiller.java:64) at DocumentFiller.main(DocumentFiller.java:258) (see attached patch file for a simple fix)
Applied in svn r656757. We need a junit for this fix (TestListLevel does not exist yet).