<AWT Dev> [8] Review request for 7117595: ArrayIndexOutOfBoundsException in Win32GraphicsEnvironment if display is removed
sergey malenkov
sergey.malenkov at oracle.com
Thu Sep 26 06:54:29 PDT 2013
Could you please review the following fix:
http://cr.openjdk.java.net/~malenkov/7117595.8.3/
<http://cr.openjdk.java.net/%7Emalenkov/7117595.8.3/>
Every getDefaultScreenDevice method throws a commented error.
It is better than unexpected NPEs from different places.
Thanks,
SAM
On 26.09.2013 13:28, Artem Ananiev wrote:
>
> On 9/24/2013 11:58 AM, Anthony Petrov wrote:
>> Hi Sergey,
>>
>> I think that throwing an AWTError is too risky for JDK 8. We might want
>> to implement this early in JDK 9 though.
>
> Both throwing an error and returning null are risky. A good news,
> however, is that we don't expect the array to be empty, so it doesn't
> matter how to fail in this case :)
>
> Let us stick with .02 version of the fix.
>
> Thanks,
>
> Artem
>
>> For now, I think returning null is OK. E.g., see
>> CGraphicsEnvironment.getDefaultScreenDevice(). It simply returns null if
>> there's no screen devices found after a second re-initialization
>> attempt. The rest of code (user apps and tests) seem to be happy with
>> this implementation.
>>
>> --
>> best regards,
>> Anthony
>>
>> On 09/23/2013 09:59 PM, sergey malenkov wrote:
>>> Could you please review the second version of the fix:
>>> http://cr.openjdk.java.net/~malenkov/7117595.8.1/
>>> I throw AWTError if there are no more screen devices.
>>>
>>> On 23.09.2013 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