> 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`.

Maurizio Cimadamore has updated the pull request incrementally with one 
additional commit since the last revision:

  Update src/java.base/share/classes/java/lang/foreign/SymbolLookup.java
  
  Co-authored-by: Paul Sandoz <paul.d.san...@googlemail.com>

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/13954/files
  - new: https://git.openjdk.org/jdk/pull/13954/files/09637772..27e82bb6

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13954&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13954&range=00-01

  Stats: 4 lines in 1 file changed: 0 ins; 3 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/13954.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13954/head:pull/13954

PR: https://git.openjdk.org/jdk/pull/13954

Reply via email to