On Fri, 2 Aug 2024 15:03:48 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> _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, since this is a 
> public API documentation.  
> 
> Simply saying "should" increases cognitive load and immediately triggers a 
> question: why have this argument at all?, and the need to search the code for 
> an explanation.
> 
> (yes, I understand we could also create a private method with the `map` 
> argument)

I've worded it more strongly such that callers _must_ pass in `null`. This is a 
private method, so we don't need to account for other usage scenarios.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1702027303

Reply via email to