提交 d3ebb8a5 编写于 作者: J Jesse Glick

Binary compatibility for callers of GroovyHookScript.<init>(String).

上级 42de07bb
...@@ -14,6 +14,7 @@ import static java.util.logging.Level.WARNING; ...@@ -14,6 +14,7 @@ import static java.util.logging.Level.WARNING;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import jenkins.model.Jenkins;
/** /**
* A collection of Groovy scripts that are executed as various hooks. * A collection of Groovy scripts that are executed as various hooks.
...@@ -43,6 +44,15 @@ public class GroovyHookScript { ...@@ -43,6 +44,15 @@ public class GroovyHookScript {
private final File home; private final File home;
private final ClassLoader loader; private final ClassLoader loader;
@Deprecated
public GroovyHookScript(String hook) {
this(hook, Jenkins.getActiveInstance());
}
private GroovyHookScript(String hook, Jenkins j) {
this(hook, j.servletContext, j.getRootDir(), j.getPluginManager().uberClassLoader);
}
public GroovyHookScript(String hook, @Nonnull ServletContext servletContext, @Nonnull File home, @Nonnull ClassLoader loader) { public GroovyHookScript(String hook, @Nonnull ServletContext servletContext, @Nonnull File home, @Nonnull ClassLoader loader) {
this.hook = hook; this.hook = hook;
this.servletContext = servletContext; this.servletContext = servletContext;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册