Changes are fine. Thanks, Jay
> On 16-Oct-2019, at 1:02 PM, Sergey Bylokhov <sergey.bylok...@oracle.com> > wrote: > > Hello. > Please review the fix for JDK 14. > > Bug: https://bugs.openjdk.java.net/browse/JDK-8213119 > Fix: http://cr.openjdk.java.net/~serb/8213119/webrev.00 > > Looks like this bug exists for a while, but it depends on the monitor+macOS > version. > On my HW I was able to reproduce it on macOS 10.15 only. > > The root cause of the problem is the value of the refresh rate of the monitor. > The macOS reports this value as "double", but we store it as "int" on the > java side. > > When the app sets this "int" value as a refresh rate we compare "double" and > "int". > If these values are the same we will successfully set it, but if the "double" > has some > fractional part then comparison fails and we throw "IllegalArgumentException". > > The fix will cast the value returned by "CGDisplayModeGetRefreshRate" to > "int" before > comparison. > > -- > Best regards, Sergey.