Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329013 - [CTabFolder] setSelectionBackground throws IAE in case of percents.length == color.length - 2
Summary: [CTabFolder] setSelectionBackground throws IAE in case of percents.length == ...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.4 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 309661
  Show dependency tree
 
Reported: 2010-10-29 04:47 EDT by Ivan Furnadjiev CLA
Modified: 2010-11-03 09:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Furnadjiev CLA 2010-10-29 04:47:17 EDT
There are cases ( see workbench DefaultThemeListener#update with highlighted color ) when the CTabFolder#setSelectionBackground is called with color/percent arrays where colors are exactly two more than percents. The current implementation of CTabFolder#setSelectionBackground throws an IAE. In the original SWT (3.6) CTabFolder code this special case is handled differently and the "extra" (third) color in the colors array is the highlight color. We have to adjust the gradient colors arrays like this is done in the original SWT CTabFolder code and not to throw an IAE.
Comment 1 Ivan Furnadjiev CLA 2010-11-03 04:36:31 EDT
Fixed in CVS HEAD.