Bug 51681 - Code example on site crashes
Summary: Code example on site crashes
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-dev
Hardware: PC Linux
: P2 trivial (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2011-08-18 19:55 UTC by tim
Modified: 2011-10-06 23:14 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description tim 2011-08-18 19:55:45 UTC
On the following page:


There is an XSSF code sample titled "XSSF and SAX (Event API)".  In the SheetHandler class the endElement method is missing code to unset the nextIsString flag.  It must be unset inside the "if(nextIsString)" block or the code will crash on the first cell after it reads a string since it will use the stale data in lastContents variable and try to parse it as an Integer.

This may not happen on all spreadsheets but it happened on the first one that I tried so YMMV.  Either way I think the fix is valid.
Comment 1 Nick Burch 2011-10-06 23:14:18 UTC
Thanks, fixed in r1179895.