[foreign-abi] RFR: 8253430: Improve the LibraryLookup API [v2]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Mon Sep 21 14:30:32 UTC 2020
> This patch implements a couple of suggestion which were made a couple of weeks ago by @BlueGoliath - here:
>
> https://mail.openjdk.java.net/pipermail/panama-dev/2020-July/010140.html
>
> Two ideas here:
> * Change the signature of `LibraryLookup::ofPath` to actually take a `Path` (rathar than a `String`)
> * Tweak `LibraryLookup::lookup` to return `Optional` (rather than throw)
>
> Both suggestions seem to change the API for the better. The second one is probably more controversial: on the one hand
> it removes the need for having exception handling logic and makes it for more composable logic. On the other hand
> clients have to manually call `get` on the lookup result. But overall seems a win.
Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
Require absolute path on LibraryLookup::ofPath
-------------
Changes:
- all: https://git.openjdk.java.net/panama-foreign/pull/348/files
- new: https://git.openjdk.java.net/panama-foreign/pull/348/files/072e97ed..265a76ec
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=348&range=01
- incr: https://webrevs.openjdk.java.net/?repo=panama-foreign&pr=348&range=00-01
Stats: 15 lines in 2 files changed: 10 ins; 0 del; 5 mod
Patch: https://git.openjdk.java.net/panama-foreign/pull/348.diff
Fetch: git fetch https://git.openjdk.java.net/panama-foreign pull/348/head:pull/348
PR: https://git.openjdk.java.net/panama-foreign/pull/348
More information about the panama-dev
mailing list