<AWT Dev> RFR: 8238936 The crash in XRobotPeer when the custom GraphicsDevice is used

Sergey Bylokhov Sergey.Bylokhov at oracle.com
Wed Feb 19 12:13:19 UTC 2020


Hello.
Please review the fix for jdk/client.

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

Our Robot's peers have an incorrect assumption that all
graphics devices passed to the constructor are supports.

  - On windows, we simply ignore this device(even if the device
    is a custom not "real" device) because we know we can move
    the mouse on every screen.
  - On macOS, we cast this device to the internal graphics device
    and get ClassCastException.
  - On Linux, we try to access the passed graphics device and its
    config via JNI and get a crash.

In the fix we throw AWTException if the device is not of the
class of the real graphical device used by the AWT toolkit
+ small cleanup

-- 
Best regards, Sergey.


More information about the awt-dev mailing list