提交 bd1f2aa7 编写于 作者: K Kohsuke Kawaguchi

[JENKINS-9367] revisting the fix --- changing the access modifier is an incompatible change.

上级 16580b58
......@@ -91,8 +91,7 @@ public class ListView extends View implements Saveable {
this.owner = owner;
}
protected Object readResolve() {
super.readResolve();
private Object readResolve() {
if(includeRegex!=null)
includePattern = Pattern.compile(includeRegex);
initColumns();
......
......@@ -129,15 +129,6 @@ public abstract class View extends AbstractModelObject implements AccessControll
this.owner = owner;
}
protected Object readResolve() {
if (properties == null) {
properties = new PropertyList(this);
} else {
properties.setOwner(this);
}
return this;
}
/**
* Gets all the items in this collection in a read-only view.
*/
......@@ -206,6 +197,19 @@ public abstract class View extends AbstractModelObject implements AccessControll
* @since 1.406
*/
public DescribableList<ViewProperty,ViewPropertyDescriptor> getProperties() {
// readResolve was the best place to do this, but for compatibility reasons,
// this class can no longer have readResolve() (the mechanism itself isn't suitable for class hierarchy)
// see JENKINS-9431
//
// until we have that, putting this logic here.
synchronized (this) {
if (properties == null) {
properties = new PropertyList(this);
} else {
properties.setOwner(this);
}
}
return properties;
}
......@@ -236,7 +240,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
*/
@Exported(name="property",inline=true)
public List<ViewProperty> getAllProperties() {
return properties.toList();
return getProperties().toList();
}
public ViewDescriptor getDescriptor() {
......@@ -637,7 +641,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
JSONObject json = req.getSubmittedForm();
properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
getProperties().rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
save();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册