Bug 51681

Summary: Code example on site crashes
Product: POI Reporter: tim
Component: XSSFAssignee: POI Developers List <dev>
Severity: trivial    
Priority: P2    
Version: 3.8-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   

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.