[foreign-memaccess+abi] RFR: 8314592: Add shortcut to SymbolLookup::find [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Sep 4 17:56:08 UTC 2023
On Tue, 22 Aug 2023 12:33:26 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> 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
I'm closing this for now. We can always revisit at a later point.
-------------
PR Comment: https://git.openjdk.org/panama-foreign/pull/871#issuecomment-1705580757
More information about the panama-dev
mailing list