<AWT Dev> [12] Review Request: 8215200 IllegalArgumentException in sun.lwawt.macosx.CPlatformWindow

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Fri Dec 14 07:32:42 UTC 2018


Hello.
Please review the fix for jdk 12.

Bug: https://bugs.openjdk.java.net/browse/JDK-8215200
Webrev: http://cr.openjdk.java.net/~serb/8215200/webrev.00

In the fix for JDK-8190230 we started to sort the list
of owned windows to maintain their z-order. But there is a small
issue in the compactor, because of this code:

=======
   if (p1 instanceof LWWindowPeer && p2 instanceof LWWindowPeer) {
     .....
   }
return 0;
=======

It means that the window without the peer(p1==null or p2==null)
is equal to any other windows, and this breaks the timsort.

After the fix a windows without peers will be equal to each other only, and their
lastBecomeMainTime timestamp will be zero.

-- 
Best regards, Sergey.


More information about the awt-dev mailing list