Bug 55650

Summary: [PATCH] Avoid ArrayIndexOutOfBoundsException when getting cell style w/ no cellStyleXfs
Product: POI Reporter: Andrej <andre.j.czapszys>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.10-dev   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: Patch to avoid ArrayIndexOutOfBoundsExeception.

Description Andrej 2013-10-11 18:25:17 UTC
I ran into this issue via org.apache.poi.ss.usermodel.DateUtil.isCellDateFormatted.

Essentially, the issue is that I'm working with xlsx spreadsheets that do not contain a <cellStyleXfs/> section.  The /cellXfs xf.xfId/ attributes are set to "0".  Instead of blowing up, I'd like poi to recognize that there is no such named style and proceed normally.
Comment 1 Andrej 2013-10-11 18:54:46 UTC
Created attachment 30921 [details]
Patch to avoid ArrayIndexOutOfBoundsExeception.
Comment 2 Nick Burch 2013-10-22 22:05:44 UTC
Thanks for this, patch applied in r1534818.