[foreign-memaccess+abi] RFR: 8314592: Add shortcut to SymbolLookup::find [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Tue Aug 22 12:33:26 UTC 2023
> This patch adds a default method in `SymbolLookup`, namely `SymbolLookup::get`. Its implementation is very simple: it calls `SymbolLookup::find` and then `Optional::get` on the result. This allows to simplify many clients that end up calling `Optional::get` or `Optional::orElseThrow` after a symbol lookup, but still retains the compositional advantage of the optional-returning lookup primitive.
Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
Address review comments
-------------
Changes:
- all: https://git.openjdk.org/panama-foreign/pull/871/files
- new: https://git.openjdk.org/panama-foreign/pull/871/files/ba015090..2409a7ef
Webrevs:
- full: https://webrevs.openjdk.org/?repo=panama-foreign&pr=871&range=01
- incr: https://webrevs.openjdk.org/?repo=panama-foreign&pr=871&range=00-01
Stats: 8 lines in 1 file changed: 7 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/panama-foreign/pull/871.diff
Fetch: git fetch https://git.openjdk.org/panama-foreign.git pull/871/head:pull/871
PR: https://git.openjdk.org/panama-foreign/pull/871
More information about the panama-dev
mailing list