RFR: 8332895: Support interpolation for backgrounds and borders [v2]
Andy Goryachev
angorya at openjdk.org
Fri Aug 2 15:07:40 UTC 2024
On Fri, 2 Aug 2024 01:25:26 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 9010:
>>
>>> 9008: *
>>> 9009: * @param property the {@code StyleableProperty}
>>> 9010: * @param result the map into which results are stored, should be {@code null}
>>
>> should be or could be?
>> see L9032
>
> _Should_ be `null` to get the non-allocating behavior if nothing is found, but _could_ also be non-null if we want to provide our own output map.
I suggest we clarify this behavior in the method description. Simply saying "should" increases cognitive load and creates a question: why have this argument in the first place, and the need to search the code for an explanation.
(yes, I understand we could also create a private method with the `map` argument)
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1701974659
More information about the openjfx-dev
mailing list