From da73ca0c77050c7cfe6327d45b5fa0c69ae2c286 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 5 Nov 2024 10:16:01 -0800 Subject: [PATCH] [JENKINS-74814] `java.lang.UnsupportedOperationException`: This stack walker does not have `RETAIN_CLASS_REFERENCE` access --- core/src/main/java/jenkins/util/SetContextClassLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/jenkins/util/SetContextClassLoader.java b/core/src/main/java/jenkins/util/SetContextClassLoader.java index c486fa4607e1..9e0a4c7dec30 100644 --- a/core/src/main/java/jenkins/util/SetContextClassLoader.java +++ b/core/src/main/java/jenkins/util/SetContextClassLoader.java @@ -62,7 +62,7 @@ public final class SetContextClassLoader implements AutoCloseable { * @since 2.362 */ public SetContextClassLoader() { - this(StackWalker.getInstance().getCallerClass()); + this(StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE).getCallerClass()); } /**