From e6a5b66d654ba88244c5058adf6bcc16df3cf67b Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 8 Aug 2023 14:43:11 -0700 Subject: [PATCH] Avoid `javax` imports in Groovy views --- .../jenkinsci/plugins/workflow/cps/Snippetizer/globals.groovy | 4 +--- .../jenkinsci/plugins/workflow/cps/Snippetizer/html.groovy | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/globals.groovy b/plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/globals.groovy index 632e02844..2c4351ab6 100644 --- a/plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/globals.groovy +++ b/plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/globals.groovy @@ -4,8 +4,6 @@ package org.jenkinsci.plugins.workflow.cps.Snippetizer import org.jenkinsci.plugins.workflow.cps.GlobalVariable import org.jenkinsci.plugins.workflow.cps.Snippetizer -import javax.servlet.RequestDispatcher - Snippetizer snippetizer = my; def l = namespace(lib.LayoutTagLib) @@ -32,7 +30,7 @@ l.layout(title:_("Pipeline Syntax: Global Variable Reference"), norefresh: true) } } dd{ - RequestDispatcher rd = request.getView(v, "help"); + def rd = request.getView(v, "help"); div(class:"help", style:"display: block") { if (rd != null) { st.include(page: "help", it: v) diff --git a/plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/html.groovy b/plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/html.groovy index bdbb1c045..bf4b4ef52 100644 --- a/plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/html.groovy +++ b/plugin/src/main/resources/org/jenkinsci/plugins/workflow/cps/Snippetizer/html.groovy @@ -14,8 +14,6 @@ import org.jenkinsci.plugins.workflow.cps.GlobalVariable import org.jenkinsci.plugins.workflow.cps.Snippetizer import org.jenkinsci.plugins.workflow.steps.StepDescriptor -import javax.servlet.RequestDispatcher - // keeps track of recursion inside generateHelp stack = new Stack();