Bug 46740 - ClassCastException received in Method findInsertPosForNewCondFormatTable in Class RecordOrderer
Summary: ClassCastException received in Method findInsertPosForNewCondFormatTable in C...
Status: RESOLVED DUPLICATE of bug 46547
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.2-FINAL
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-19 18:12 UTC by bob Stox
Modified: 2009-02-19 19:56 UTC (History)
0 users



Attachments
Excel Spreadsheet (20.00 KB, application/vnd.ms-excel)
2009-02-19 18:12 UTC, bob Stox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bob Stox 2009-02-19 18:12:20 UTC
Created attachment 23283 [details]
Excel Spreadsheet

I received a classcastedexception when trying to execute the shiftRows method.  I have attached the spreadsheet that caused the problem.  All you have to do is open the workbook, get the sheet and try to shift some rows and you should get the exception.  To fix the problem I just added a try-catch.  This seemed to fix my problem but not sure if the problem isn't elsewhere.
Comment 1 Josh Micich 2009-02-19 19:56:46 UTC
The bug as you describe has already been fixed with bug 46547. 

BTW - it's sometimes useful to search for a existing report of your bug:
http://www.google.com/search?q=findInsertPosForNewCondFormatTable+ClassCastException

Your sample spreadsheet has data validations (part of the conditions to cause bug 46547).  POI currently does not adjust data validations during shiftRows().  If the shifted rows don't affect the data validation regions, this will not be a problem for you.  Otherwise, please open a new bugzilla to request that enhancement.

Data validations is one of several potential adjustments that POI doesn't do yet.  See - bug 46742 for an outline of known deficiencies in shiftRows().

*** This bug has been marked as a duplicate of bug 46547 ***