On Fri, 2 Aug 2024 01:25:26 GMT, Michael Strauß <mstra...@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