提交 e9b00c35 编写于 作者: M martinficker

don't use the deprecated newInstance method.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@10066 71c3de6d-444a-0410-be80-ed276b4c234a
上级 e68137bd
......@@ -17,6 +17,7 @@ import hudson.tasks.test.TestResultProjectAction;
import hudson.util.FormFieldValidator;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.types.FileSet;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
......@@ -36,9 +37,10 @@ public class JUnitResultArchiver extends Publisher implements Serializable, Matr
* {@link FileSet} "includes" string, like "foo/bar/*.xml"
*/
private final String testResults;
public JUnitResultArchiver(String testResults) {
this.testResults = testResults;
@DataBoundConstructor
public JUnitResultArchiver(String junitreport_includes) {
this.testResults = junitreport_includes;
}
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
......@@ -127,10 +129,6 @@ public class JUnitResultArchiver extends Publisher implements Serializable, Matr
new FormFieldValidator.WorkspaceFileMask(req,rsp).process();
}
public Publisher newInstance(StaplerRequest req) {
return new JUnitResultArchiver(req.getParameter("junitreport_includes"));
}
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
// for Maven we have SurefireArchiver that automatically kicks in.
return !AbstractMavenProject.class.isAssignableFrom(jobType);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册