8319563: Reformat code in the FFM API

Reviewed-by: mcimadamore
This commit is contained in:
Per Minborg 2023-11-07 11:39:41 +00:00
parent ac0ee20a38
commit 42f43c520c
3 changed files with 12 additions and 5 deletions

View file

@ -228,7 +228,8 @@ public interface SymbolLookup {
@CallerSensitive
@Restricted
static SymbolLookup libraryLookup(String name, Arena arena) {
Reflection.ensureNativeAccess(Reflection.getCallerClass(), SymbolLookup.class, "libraryLookup");
Reflection.ensureNativeAccess(Reflection.getCallerClass(),
SymbolLookup.class, "libraryLookup");
if (Utils.containsNullChars(name)) {
throw new IllegalArgumentException("Cannot open library: " + name);
}
@ -256,7 +257,8 @@ public interface SymbolLookup {
@CallerSensitive
@Restricted
static SymbolLookup libraryLookup(Path path, Arena arena) {
Reflection.ensureNativeAccess(Reflection.getCallerClass(), SymbolLookup.class, "libraryLookup");
Reflection.ensureNativeAccess(Reflection.getCallerClass(),
SymbolLookup.class, "libraryLookup");
return libraryLookup(path, RawNativeLibraries::load, arena);
}