<AWT Dev> [10] Review Request: JDK-8145795 : [PIT] java/awt/Window/ScreenLocation/ScreenLocationTest.java fails (can assign Integer.MAX_VALUE to Window dimensions)

Pankaj Bansal pankaj.b.bansal at oracle.com
Mon Oct 9 07:53:38 UTC 2017


Hi,

 

Please review the fix for JDK 10.

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-8145795

 

Webrev:

 http://cr.openjdk.java.net/~aghaisas/pankaj/8145795/webrev.00/

 

Issue:

The awt window size is capped at a max value, but with hidpi support, an regression was introduced because of which the window size is wrong and even INT_MAX window size is possible.

 

Fix:

The issue is due to the int overflow. There was no check to keep the window size between int min and max values. Due to which, the windows size was wrong. Added int limit checks.

 

Regards,

Pankaj Bansal

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20171009/18a8d28d/attachment.html>


More information about the awt-dev mailing list