Community
Participate
Working Groups
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.
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.