<AWT Dev> [8] Review request for 7117595: ArrayIndexOutOfBoundsException in Win32GraphicsEnvironment if display is removed
sergey malenkov
sergey.malenkov at oracle.com
Mon Sep 23 06:38:10 PDT 2013
Hi Anthony,
> I suggest to check both bounds for the default screen index. Something
> like the following should do: max(0, min(index, screens.length - 1)).
Seems we should fix other environments too.
> Also, I assume that getScreenDevices() can't return null or an empty
> array, can it? For added safety, we might want to check this too, and
> return null in this case.
The getScreenDevices method can't return null, but it could be an empty
array. There are many places, where the getDefaultScreenDevice method
is used. Our code does not expect the null value. We could throw
HeadlessException instead. What do you think?
> --
> best regards,
> Anthony
>
> On 09/23/13 16:47, sergey malenkov wrote:
>> Hello,
>>
>> Could you please review the following fix:
>> fix:http://cr.openjdk.java.net/~malenkov/7117595.8.0/
>> bug:https://bugs.openjdk.java.net/browse/JDK-7117595
>>
>> Thanks,
>> SAM
More information about the awt-dev
mailing list