Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 329013

Summary: [CTabFolder] setSelectionBackground throws IAE in case of percents.length == color.length - 2
Product: [RT] RAP Reporter: Ivan Furnadjiev <ivan>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: rsternberg
Version: 1.3   
Target Milestone: 1.4 M3   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 309661    

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.