提交 197a3012 编写于 作者: K kohsuke

Rolling back the previous fix.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@9206 71c3de6d-444a-0410-be80-ed276b4c234a
上级 6502ced7
......@@ -6,7 +6,6 @@ import org.apache.commons.jelly.JellyException;
import org.kohsuke.stapler.MetaClass;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.jelly.JellyClassTearOff;
import net.sf.json.JSONObject;
/**
* {@link Descriptor} for {@link MavenReporter}.
......@@ -47,14 +46,6 @@ public abstract class MavenReporterDescriptor extends Descriptor<MavenReporter>
return null;
}
/**
* If {@link #hasConfigScreen() the reporter has no configuration screen},
* this method can safely return null, which is the default implementation.
*/
public MavenReporter newInstance(StaplerRequest req, JSONObject formData) throws FormException {
return null;
}
/**
* Returns true if this descriptor has <tt>config.jelly</tt>.
*/
......
......@@ -17,6 +17,7 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
/**
* Metadata about a configurable instance.
......@@ -126,7 +127,7 @@ public abstract class Descriptor<T extends Describable<T>> {
try {
Method m = getClass().getMethod("newInstance", StaplerRequest.class);
if(m.getDeclaringClass()!=Descriptor.class) {
if(!Modifier.isAbstract(m.getDeclaringClass().getModifiers())) {
// this class overrides newInstance(StaplerRequest).
// maintain the backward compatible behavior
return newInstance(req);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册