RFR: 8287834: Add SymbolLookup::or method

Paul Sandoz psandoz at openjdk.org
Tue May 16 16:57:46 UTC 2023


On Tue, 16 May 2023 16:50:34 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/foreign/SymbolLookup.java line 136:
>> 
>>> 134:      * lookup} More specifically, if a symbol is not found using this lookup, the provided lookup will be
>>> 135:      * used as fallback. In other words, the resulting symbol lookup will only return {@linkplain Optional#empty()}
>>> 136:      * if both lookups fail to retrieve a given symbol.
>> 
>> Suggestion:
>> 
>>      * {@return a composed symbol lookup that returns result of finding the symbol with this lookup if found, otherwise returns the result of finding the symbol with the other lookup.}
>
> I was trying to split the sentence so that we could get a compact javadoc header for the factory. How much important is that?

Not very IHMO. I was just trying to say the same thing you said with less words, which makes it more amenable to being expressed as a compact javadoc header.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13954#discussion_r1195449970


More information about the core-libs-dev mailing list