RFR: 7903983: Remove redundant findOrThrow method
`SymbolLookup::FindOrThrow` was introduced in JDK 23, making this method in the generated code redundant: static MemorySegment findOrThrow(String symbol) { return SYMBOL_LOOKUP.findOrThrow(symbol); } The generated method should have been dropped in https://github.com/openjdk/jextract/commit/a53f5c05e3ee2cca057cadb78b2e381c3... but I didn't cleanup all uses of it. A small additional cleanup in PR is that the newly added option for framworks now uses `--` rather than `-` TIA ------------- Commit messages: - remove rendundant method - longer cmd option should use -- rather than - Changes: https://git.openjdk.org/jextract/pull/280/files Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=280&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903983 Stats: 27 lines in 5 files changed: 3 ins; 4 del; 20 mod Patch: https://git.openjdk.org/jextract/pull/280.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/280/head:pull/280 PR: https://git.openjdk.org/jextract/pull/280
On Fri, 28 Mar 2025 14:11:26 GMT, Nizar Benalla <nbenalla@openjdk.org> wrote:
`SymbolLookup::FindOrThrow` was introduced in JDK 23, making this method in the generated code redundant:
static MemorySegment findOrThrow(String symbol) { return SYMBOL_LOOKUP.findOrThrow(symbol); }
The generated method should have been dropped in https://github.com/openjdk/jextract/commit/a53f5c05e3ee2cca057cadb78b2e381c3... but I didn't cleanup all uses of it.
A small additional cleanup in PR is that the newly added option for framworks now uses `--` rather than `-`
Edit: all tests pass in CI on all platforms, GitHub failure is unrelated
TIA
Looks good! ------------- Marked as reviewed by mcimadamore (Reviewer). PR Review: https://git.openjdk.org/jextract/pull/280#pullrequestreview-2726282132
On Fri, 28 Mar 2025 14:11:26 GMT, Nizar Benalla <nbenalla@openjdk.org> wrote:
`SymbolLookup::FindOrThrow` was introduced in JDK 23, making this method in the generated code redundant:
static MemorySegment findOrThrow(String symbol) { return SYMBOL_LOOKUP.findOrThrow(symbol); }
The generated method should have been dropped in https://github.com/openjdk/jextract/commit/a53f5c05e3ee2cca057cadb78b2e381c3... but I didn't cleanup all uses of it.
A small additional cleanup in PR is that the newly added option for framworks now uses `--` rather than `-`
Edit: all tests pass in CI on all platforms, GitHub failure is unrelated
TIA
@nizarbenalla Your change (at version ff9b31ba4df650331a9663b6a21c84571eddf060) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jextract/pull/280#issuecomment-2775641105
On Fri, 28 Mar 2025 14:11:26 GMT, Nizar Benalla <nbenalla@openjdk.org> wrote:
`SymbolLookup::FindOrThrow` was introduced in JDK 23, making this method in the generated code redundant:
static MemorySegment findOrThrow(String symbol) { return SYMBOL_LOOKUP.findOrThrow(symbol); }
The generated method should have been dropped in https://github.com/openjdk/jextract/commit/a53f5c05e3ee2cca057cadb78b2e381c3... but I didn't cleanup all uses of it.
A small additional cleanup in PR is that the newly added option for framworks now uses `--` rather than `-`
Edit: all tests pass in CI on all platforms, GitHub failure is unrelated
TIA
This pull request has now been integrated. Changeset: 3fe6e4ea Author: Nizar Benalla <nbenalla@openjdk.org> Committer: Maurizio Cimadamore <mcimadamore@openjdk.org> URL: https://git.openjdk.org/jextract/commit/3fe6e4ea9480aa0489407ddd215cdf2a4c9f... Stats: 27 lines in 5 files changed: 3 ins; 4 del; 20 mod 7903983: Remove redundant findOrThrow method Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.org/jextract/pull/280
participants (3)
-
duke
-
Maurizio Cimadamore
-
Nizar Benalla