RFR: JDK-8306990: The guarantees given by Region's floor and ceiling functions should work for larger values [v6]
John Hendrikx
jhendrikx at openjdk.org
Thu Jun 1 00:06:20 UTC 2023
On Wed, 31 May 2023 20:03:04 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with three additional commits since the last revision:
>>
>> - Remove seed
>> - Add test cases for negative values
>> - Add copyright headers
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/scene/layout/ScaledMath.java line 31:
>
>> 29: * Math functions which deal with rounding scaled values.
>> 30: */
>> 31: public class ScaledMath {
>
> If you want, you could make this class final and give it a private constructor. But since this is not public API, it probably doesn't matter all that much.
Thanks, I'll leave it as-is for now.
> modules/javafx.graphics/src/test/java/test/javafx/scene/layout/RegionTest.java line 1323:
>
>> 1321:
>> 1322: double[] scales = new double[] {1.0, 1.25, 1.5, 1.75, 2.0, 1.374562997, 20.0};
>> 1323: Random random = new Random();
>
> In my opinion, using a fixed seed would have been preferable here.
I agree with you, but I'll like to leave it now as-is as it was already discussed, and it won't make much of a difference at this point as there are better tests in place directly on `ScaledMath`.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1118#discussion_r1212429858
PR Review Comment: https://git.openjdk.org/jfx/pull/1118#discussion_r1212428408
More information about the openjfx-dev
mailing list