Bug 23672

Summary: SSTRecord.getString(int) throws NullPointerException
Product: POI Reporter: Morten P <morten>
Component: HSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P3    
Version: 2.0-pre3   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Test case for POI 2

Description Morten P 2003-10-08 12:04:48 UTC
I have an excel document that results in the following exception being thrown:

Exception in thread "main" java.lang.NullPointerException
        at org.apache.poi.hssf.record.SSTRecord.getString(SSTRecord.java:313)
        at DoTest$TestHandler.processRecord(DoTest.java:26)
        at org.apache.poi.hssf.eventusermodel.HSSFRequest.processRecord(HSSFRequ
        at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEve
        at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSS
        at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processWorkbookEv
        at DoTest.processFile(DoTest.java:49)
        at DoTest.main(DoTest.java:64)

This happens for CVS HEAD, 2.0-pre3 and 1.5.1 (in 1.5.1 the NullPointer is in
SSTRecord.java line 309 though). The excel document contains english and
taiwanese texts. I cannot attach the document here due to NDA issues.

If I do a search/replace on a simple string that occurs in the sheet, and 
saves it, the saved version works fine. But either way, the 
SSTRecord.getString(int) should not ever be able to result in a NPE, right?
Comment 1 Morten P 2003-10-08 12:12:59 UTC
Created attachment 8491 [details]
Test case for POI 2
Comment 2 Jason Height 2005-08-26 04:32:38 UTC
The SST deserialisation code has been rewritten. I suspect that this bug is long