mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
[JENKINS-9367] revisting the fix --- changing the access modifier is an incompatible change.
This commit is contained in:
1 parent
dfc2fe3895
commit
ce9ef803f7
2 files changed
+16
-13
No files matched your search
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user