RFR: 8332895: Support interpolation for backgrounds and borders [v3]
Michael Strauß
mstrauss at openjdk.org
Sat Aug 3 10:10:41 UTC 2024
On Fri, 2 Aug 2024 22:30:25 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> Michael Strauß has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - fix since tag
>> - adjust table styling
>
> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 9020:
>
>> 9018: if (timer != null) {
>> 9019: if (result == null) {
>> 9020: result = new HashMap<>(5);
>
> I think that when you specify map sizes like this, it might be worth a comment at the intent. Did you intend to create a map that can hold 6 items before resizing? (5 becomes 8, which is sufficient for 6 mappings with a 75% load factor). If you want to express the intent more clearly, use `HashMap.newHashMap(5)`.
I feel that the default initial capacity of 16 is more than can be reasonably expected for transitions. However, I did not use any rigorous methodology to come up with the number 5. I can add a comment, though.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1702670457
More information about the openjfx-dev
mailing list