RFR: JDK-8298060: Fix precision bug in gesture recognizer classes

Kevin Rushforth kcr at openjdk.org
Mon Dec 12 23:07:01 UTC 2022


On Mon, 12 Dec 2022 22:00:09 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/com/sun/javafx/tk/quantum/RotateGestureRecognizer.java line 60:
>> 
>>> 58:             String s = System.getProperty("com.sun.javafx.gestures.rotate.threshold");
>>> 59:             if (s != null) {
>>> 60:                 rotationThresholdDegrees = Double.valueOf(s);
>> 
>> should we catch a NumberFormatException and re-throw it with a meaningful text message?  Or the current behavior is ok?
>> 
>> ditto on line 64
>
> I suppose that would be out of scope for this PR.  I agree though that it would be good to mention that the double that couldn't be parsed is the one we got from `System.getProperty("com.sun.javafx.gestures.rotate.threshold")` as otherwise the error would mean nothing to anyone.

Yes, that sort of change seems out of scope.

-------------

PR: https://git.openjdk.org/jfx/pull/966


More information about the openjfx-dev mailing list