<AWT Dev>  Review Request: JDK-8145795 : [PIT] java/awt/Window/ScreenLocation/ScreenLocationTest.java fails (can assign Integer.MAX_VALUE to Window dimensions)
pankaj.b.bansal at oracle.com
Tue Oct 17 11:48:23 UTC 2017
Yes, similar changes have to be made in XToolkit also. What happens in XToolkit is that after the int overflow, when garbage width and height is passed to XCreateWindow, it handles it properly at its own end. So the test passes without any fix also. But the into overflow should not happen in the first place.
I have made changes in X11GraphicsConfig and XlibUtil Scaling functions and incorporated in the webrev.
I can see that XDragSourceContextPeer.java also contains ScaleUp and ScaleDown functions, but I don't see them being called from anywhere. So have not made changes in the same.
From: Sergey Bylokhov
Sent: Tuesday, October 17, 2017 4:03 AM
To: Pankaj Bansal; awt-dev at openjdk.java.net
Subject: Re: <AWT Dev>  Review Request: JDK-8145795 : [PIT] java/awt/Window/ScreenLocation/ScreenLocationTest.java fails (can assign Integer.MAX_VALUE to Window dimensions)
Can you please check that the same changes needs to be applied to the
On 09/10/2017 00:53, Pankaj Bansal wrote:
> Please review the fix for JDK 10.
> 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.
> 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.
> Pankaj Bansal
Best regards, Sergey.
More information about the awt-dev