Skip to content

Commit

Permalink
Merge pull request #18435 from keithc-ca/loader
Browse files Browse the repository at this point in the history
Tolerate null in getLoaderNameID()
  • Loading branch information
pshipton authored Nov 9, 2023
2 parents f7cf540 + 086db59 commit 3126552
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jcl/src/java.base/share/classes/java/lang/Access.java
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,9 @@ public <T> void setCarrierThreadLocal(CarrierThreadLocal<T> carrierThreadlocal,
/*[IF JAVA_SPEC_VERSION >= 11]*/
@Override
public String getLoaderNameID(ClassLoader loader) {
if (loader == null) {
return "null";
}
StringBuilder buffer = new StringBuilder();
String name = loader.getName();

Expand Down

0 comments on commit 3126552

Please sign in to comment.