Hi Sergey,

I suggest to check both bounds for the default screen index. Something like the following should do: max(0, min(index, screens.length - 1)).

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.

--
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

Reply via email to