Integrated: 8287834: Add SymbolLookup::or method
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon May 22 14:55:04 UTC 2023
On Fri, 12 May 2023 12:11:23 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> This patch adds a simpler method for composing symbol lookups. It is common for clients to chain multiple symbol lookups together, e.g. to find a symbol in multiple libraries.
>
> A new instance method, namely `SymbolLookup::or` is added, which first searches a symbol in the first lookup, and, if that fails, proceeds to search the symbol in the provided lookup.
>
> We have considered alternatives to express this, such as a static factory `SymbolLookup::ofComposite` but settled on this because of the similarity with `Optional::or`.
This pull request has now been integrated.
Changeset: 91aeb5de
Author: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/91aeb5de580633dfc361957051cd00545aa883c7
Stats: 167 lines in 2 files changed: 167 ins; 0 del; 0 mod
8287834: Add SymbolLookup::or method
Reviewed-by: psandoz
-------------
PR: https://git.openjdk.org/jdk/pull/13954
More information about the core-libs-dev
mailing list