<AWT Dev> [9] Review Request: 8154088 [macosx] SWT does not work on JDK 9 since b65

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Tue Apr 12 23:15:29 UTC 2016

Please review the fix for jdk9.

The root cause of the problem is that the peer is initialized and 
validated on the different threads. SWT calls addNotify() on EDT and 
validateWithBounds() on the Main thread. The bug was found when I worked 
on JDK-8148109 [1]

In the fix of JDK-8074028 [2] I moved the getPeer() outside of the 
runnable, but at this point the peer still not initialized. In this fix 
I moved the code back.

Note that the fix has no test, this is a basic functionality which 
should be covered by SQE tests. But it seems these tests were commented 
out on OSX before JDK-7154778 [3], I'll send a request to SQE to run them.

[1] https://bugs.openjdk.java.net/browse/JDK-8148109
[2] https://bugs.openjdk.java.net/browse/JDK-8074028
[3] https://bugs.openjdk.java.net/browse/JDK-7154778

Bug: https://bugs.openjdk.java.net/browse/JDK-8154088
Webrev can be found at: http://cr.openjdk.java.net/~serb/8154088/webrev.00

Best regards, Sergey.

More information about the awt-dev mailing list