提交 027a708f 编写于 作者: K Kohsuke Kawaguchi

take advantage of the new Descriptor constructor to simplify.

上级 32424727
......@@ -53,10 +53,6 @@ import org.kohsuke.stapler.StaplerResponse;
*/
@Extension
public class DownloadService extends PageDecorator {
public DownloadService() {
super(DownloadService.class);
}
/**
* Builds up an HTML fragment that starts all the download jobs.
*/
......
......@@ -76,12 +76,18 @@ public abstract class PageDecorator extends Descriptor<PageDecorator> implements
* @param yourClass
* pass-in "this.getClass()" (except that the constructor parameters cannot use 'this',
* so you'd have to hard-code the class name.
* @deprecated as of 1.425
* Use the default constructor that's less error prone
*/
protected PageDecorator(Class<? extends PageDecorator> yourClass) {
super(yourClass);
}
// this will never work because Descriptor and Describable are the same thing.
protected PageDecorator() {
super(self());
}
// this will never work because Descriptor and Describable are the same thing.
// protected PageDecorator() {
// }
......
......@@ -1240,9 +1240,6 @@ public class UpdateCenter extends AbstractModelObject implements Saveable {
*/
@Extension
public static class PageDecoratorImpl extends PageDecorator {
public PageDecoratorImpl() {
super(PageDecoratorImpl.class);
}
}
/**
......
......@@ -85,7 +85,6 @@ public class UsageStatistics extends PageDecorator {
* Creates an instance with a specific public key image.
*/
public UsageStatistics(String keyImage) {
super(UsageStatistics.class);
this.keyImage = keyImage;
load();
}
......
......@@ -65,10 +65,6 @@ public class SystemConfigurationTestCase extends HudsonTestCase {
private static class PageDecoratorImpl extends PageDecorator {
private String decoratorId;
protected PageDecoratorImpl() {
super(PageDecoratorImpl.class);
}
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
decoratorId = json.getString("decoratorId");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册