Bug 55650 - [PATCH] Avoid ArrayIndexOutOfBoundsException when getting cell style w/ no cellStyleXfs
Summary: [PATCH] Avoid ArrayIndexOutOfBoundsException when getting cell style w/ no ce...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.10-dev
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-11 18:25 UTC by Andrej
Modified: 2013-10-22 22:05 UTC (History)
0 users



Attachments
Patch to avoid ArrayIndexOutOfBoundsExeception. (2.15 KB, patch)
2013-10-11 18:54 UTC, Andrej
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.