DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=41139>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=41139 ------- Additional Comments From [EMAIL PROTECTED] 2007-04-03 14:00 ------- I have run into the same bug (UnknownRecord throwing an ArrayIndexOutOfBoundsException), and here is a possible solution Change the 3rd constructor to read: public UnknownRecord( short id, short size, byte[] data, int offset ) { sid = id; // ObjRecord's fillFields was getting an obviously wrong subRecordSize, // which it passes to SubRecord.createSubRecord, which passes the value // here as "size". // // Instead of allowing an ArrayIndexOutOfBoundsException // to happen, let's change the size if appropriate. if ( size > (data.length - offset) ) { size = (short)(data.length - offset); } thedata = new byte[size]; System.arraycopy(data, offset, thedata, 0, size); } It could be argued that this is just patching the real problem; the real problem is that we have bogus length/size for some Unknown record type in Excel. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/