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 2011/07/15 16:47:13 UTC
DO NOT REPLY [Bug 51514] New: NullPointerExceptions in HSSFWorkbook
https://issues.apache.org/bugzilla/show_bug.cgi?id=51514
Bug #: 51514
Summary: NullPointerExceptions in HSSFWorkbook
Product: POI
Version: 3.8-dev
Platform: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: antoni.mylka@aduna-software.com
Classification: Unclassified
Created attachment 27290
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27290
A ZIP file which combines a patch and a test doc.
I noticed two issues, both related to the fact that the NPOIFSFileSystem
instance isn't propagated correctly everywhere it should be.
If I create a HSSFWorkbook from an NPoiFileSystem then
1. I get an NPE in HSSFWorkbook.write(OutputStream stream). It's because it
passes a POIFSFileSystem to the copyNodesMethod. The reference is null. The
code should check which of the filesystem references is not-null and use the
correct one.
2. I get NPEs while working with the HSSFObjectData instances obtained from the
HSSFWorkbook.getAllEmbeddedObject. This is because they are all created using a
constructor which accepts an POIFSFileSystem. If this is null - problems arise.
--
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 51514] NullPointerExceptions in HSSFWorkbook
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51514
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Nick Burch <ni...@alfresco.com> 2011-07-15 15:19:38 UTC ---
Looks like we can fix both easily by just using the DirectoryNode roots, rather
than passing in the POIFSFileSystem and immediately getting the root
Fixed in r1147179 and r1147183
I've applied your test, with some changes in r1147188, thanks for that!
--
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 51514] NullPointerExceptions in HSSFWorkbook
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51514
Nick Burch <ni...@alfresco.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS/Version| |All
--- Comment #1 from Nick Burch <ni...@alfresco.com> 2011-07-15 14:52:03 UTC ---
NPOIFS doesn't currently support writing. Doesn't matter if you pass the NPOIFS
instance along into the write method, it won't help - you can't currently write
out
Once we've finished the NPOIFS write support, we'll then need to tweak how HSSF
does writing
The object data is reading so should be fixed, will look into that
--
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