https://issues.apache.org/bugzilla/show_bug.cgi?id=51681

             Bug #: 51681
           Summary: Code example on site contains a bug
           Product: POI
           Version: 3.8-dev
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: XSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


On the following page:

http://poi.apache.org/spreadsheet/how-to.html

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.

-- 
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