[JENKINS-74814] `java.lang.UnsupportedOperationException`: This stack walker does not have `RETAIN_CLASS_REFERENCE` access (#9945)

This commit is contained in:
Basil Crow 2024-11-08 05:49:00 -08:00 committed by GitHub
parent 0bc21b9425
commit ac63b7f156
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ public final class SetContextClassLoader implements AutoCloseable {
* @since 2.362 * @since 2.362
*/ */
public SetContextClassLoader() { public SetContextClassLoader() {
this(StackWalker.getInstance().getCallerClass()); this(StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE).getCallerClass());
} }
/** /**