8319436: Proxy.newProxyInstance throws NPE if loader is null and interface not visible from class loader

Reviewed-by: alanb
This commit is contained in:
Mandy Chung 2023-11-07 17:00:08 +00:00
parent 82747132b0
commit 8eb6f617b3
2 changed files with 64 additions and 121 deletions

View file

@ -2667,7 +2667,7 @@ public final class System {
}
public String getLoaderNameID(ClassLoader loader) {
return loader.nameAndId();
return loader != null ? loader.nameAndId() : "null";
}
@Override