Bug 236484 - [Forms] FormImages should guard against requests with null or disposed colors
Summary: [Forms] FormImages should guard against requests with null or disposed colors
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M1   Edit
Assignee: Adam Archer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-10 14:46 EDT by Adam Archer CLA
Modified: 2008-06-23 15:01 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Archer CLA 2008-06-10 14:46:59 EDT
In FormImages we blindly accept parameters that are passed and do not verify that Colors are non-null and are not disposed.

When requests are made for gradients with invalid parameters we should return null rather than trying to create images and throwing NPEs.
Comment 1 Adam Archer CLA 2008-06-23 15:01:37 EDT
Fixed in HEAD.

FormImages will now return null if it is passed null or disposed Colors or if the array of Colors is length 0 for getGradient(Color[], int[], int, boolean, Color). It will still accept null for the background, but will not accept a disposed Color.