From de25478f3f978253f47c45d0e84f03250da28623 Mon Sep 17 00:00:00 2001 From: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> Date: Tue, 17 Sep 2024 03:36:50 +0200 Subject: [PATCH] [JENKINS-73785] Restore `ContextMenu#from` with `StaplerRequest`/`Response` args (#9737) Co-authored-by: Daniel Beck --- .../main/java/jenkins/model/ModelObjectWithContextMenu.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java b/core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java index 2fa50556574c..f46280fef0c0 100644 --- a/core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java +++ b/core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java @@ -299,6 +299,10 @@ public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest2 request return from(self, request, response, "sidepanel"); } + public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest request, StaplerResponse response) throws JellyException, IOException { + return from(self, StaplerRequest.toStaplerRequest2(request), StaplerResponse.toStaplerResponse2(response), "sidepanel"); + } + public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest2 request, StaplerResponse2 response, String view) throws JellyException, IOException { WebApp webApp = WebApp.getCurrent(); final Script s = webApp.getMetaClass(self).getTearOff(JellyClassTearOff.class).findScript(view);