-
Enhancement
-
Resolution: Fixed
-
P4
-
None
-
None
As we have introduced `SymbolLookup::FindOrThrow` we could remove the generated method:
```
public static MemorySegment findOrThrow(String symbol) {
return SYMBOL_LOOKUP.find(symbol)
.orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol));
}
```
However, this can only be made if targeting Java 23 or later so there is a compatibility issue to be solved here.
```
public static MemorySegment findOrThrow(String symbol) {
return SYMBOL_LOOKUP.find(symbol)
.orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol));
}
```
However, this can only be made if targeting Java 23 or later so there is a compatibility issue to be solved here.
- relates to
-
CODETOOLS-7903926 jtreg/generator/testLinkageErrors/TestLinkageErrors.java failed with "expected [true] but found [false]"
- Resolved
- links to
-
Commit(master) openjdk/jextract/a53f5c05
-
Review(master) openjdk/jextract/266