https://issues.apache.org/bugzilla/show_bug.cgi?id=45000

           Summary: ListLevel.toByteArray() can fail with a
                    NullPointerException
           Product: POI
           Version: 3.0-dev
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HWPF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=21963)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21963)
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)


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to