Bug 23672 - SSTRecord.getString(int) throws NullPointerException
Summary: SSTRecord.getString(int) throws NullPointerException
Status: RESOLVED WONTFIX
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-pre3
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-08 12:04 UTC by Morten P
Modified: 2005-08-25 20:32 UTC (History)
0 users



Attachments
Test case for POI 2 (1.80 KB, text/plain)
2003-10-08 12:12 UTC, Morten P
Details

Note You need to log in before you can comment on or make changes to this bug.
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
est.java:173)
        at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEve
nts(HSSFEventFactory.java:208)
        at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSS
FEventFactory.java:139)
        at org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processWorkbookEv
ents(HSSFEventFactory.java:104)
        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
gone.

Jason