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: [email protected]
        ReportedBy: [email protected]
    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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to