You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/05/15 08:00:29 UTC

DO NOT REPLY [Bug 45000] New: ListLevel.toByteArray() can fail with a NullPointerException

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: dev@poi.apache.org
        ReportedBy: nhira@cognocys.com


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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 45000] ListLevel.toByteArray() can fail with a NullPointerException

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45000


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Josh Micich <jo...@gildedtree.com>  2008-05-15 10:53:06 PST ---
Applied in svn r656757.

We need a junit for this fix (TestListLevel does not exist yet).


-- 
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org