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 2009/06/09 22:58:02 UTC

DO NOT REPLY [Bug 45877] Null base style for paragraph results in crash

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





--- Comment #1 from Chris Walter <cw...@docfinity.com>  2009-06-09 13:58:00 PST ---
Created an attachment (id=23783)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23783)
Patch that modifies stylesheets.

During the initialization of "org.apache.poi.hwpf.model.StyleSheet" POI runs
through all the style descriptions and adds them to the StyleDescription array
in the createPAP method. If a description has an improperly set parent (ie it's
parent is null) it still tries to run the ParagraphSprmUncompressor. Doing so
attempts to clone the parent and throws a Null Pointer exception. The attached
patch simply blocks the running of the uncompressor if the parent is null. I've
tested this and it passes all tests and fixes the previously attached document
as well as some of my own.

If this fixed in deemed inappropriate, please do not fix with a Runtime error.
The documents contents have still been loaded correctly and should still be
useable in certain contexts.

-- 
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