You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2008/09/11 13:42:30 UTC
DO NOT REPLY [Bug 45777] New: header overflow
https://issues.apache.org/bugzilla/show_bug.cgi?id=45777
Summary: header overflow
Product: POI
Version: 3.0-dev
Platform: All
OS/Version: All
Status: NEW
Keywords: ErrorMessage
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: aaacmc@mail.ru
When header length more than 255 symbols (maximum allowed by xls format)
java.lang.ArrayIndexOutOfBoundsException occures
Code:
HSSFWorkbook workBook = new HSSFWorkbook();
HSSFSheet sheet = workBook.createSheet("Sheet 1");
sheet.getHeader().setCenter(reportTitle);
Exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at org.apache.poi.util.StringUtil.putUnicodeLE(StringUtil.java:208)
at
org.apache.poi.hssf.record.HeaderRecord.serialize(HeaderRecord.java:179)
at org.apache.poi.hssf.model.Sheet.serialize(Sheet.java:825)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:1188)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1118)
at poiutils.HSSFUtils.flushWorkBook(HSSFUtils.java:170)
at POITest.main(POITest.java:45)
--
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 45777] header overflow
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45777
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Nick Burch <ni...@torchbox.com> 2008-09-11 05:34:35 PST ---
Any thoughts on what would be a logical exception to throw instead? Perhaps
IllegalArgumentException or IllegalStateException
I think picking the right exception may well be harder than detecting the
situation and throwing it :)
--
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 45777] header overflow
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45777
Nick Burch <ni...@torchbox.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
--- Comment #2 from Nick Burch <ni...@torchbox.com> 2008-09-21 10:38:38 PST ---
IllegalArgumentException is now thrown at the right point
--
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 45777] header overflow
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45777
--- Comment #4 from Josh Micich <jo...@gildedtree.com> 2009-06-03 20:57:03 PST ---
This bug was probably mis-diagnosed. Excel handles header / footer text longer
than 256 bytes, and none of the documentation mentions this limit.
Prior to the introduction of StandardRecord (and LittleEndian input/output
refactoring of the BIFF serialization) this code was much more fragile. It's
likely that the original bug was fixed through all that work.
As of the fix for bug 47244, POI now allows header / footer text much longer
than 256 bytes. POI enforces a limit of 8221 bytes. I am not sure if this is
the absolute max, but it avoids the need for BIFF record continuation logic.
--
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 45777] header overflow
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45777
--- Comment #3 from Josh Micich <jo...@gildedtree.com> 2009-06-03 19:02:52 PST ---
svn r697559 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=697559 )
.
--
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org