Skip to content
Permalink
Browse files
[JENKINS-9367] revisting the fix --- changing the access modifier is …
…an incompatible change.
  • Loading branch information
kohsuke committed Apr 18, 2011
1 parent dfc2fe3 commit ce9ef803f73637677d08edd3ae1705d10f229d62
Showing with 16 additions and 13 deletions.
  1. +1 −2 core/src/main/java/hudson/model/ListView.java
  2. +15 −11 core/src/main/java/hudson/model/View.java
@@ -91,8 +91,7 @@ public ListView(String name, ViewGroup owner) {
this.owner = owner;
}

protected Object readResolve() {
super.readResolve();
private Object readResolve() {
if(includeRegex!=null)
includePattern = Pattern.compile(includeRegex);
initColumns();
@@ -129,15 +129,6 @@ protected View(String name, ViewGroup owner) {
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 String getDescription() {
* @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 void save() throws IOException {
*/
@Exported(name="property",inline=true)
public List<ViewProperty> getAllProperties() {
return properties.toList();
return getProperties().toList();
}

public ViewDescriptor getDescriptor() {
@@ -637,7 +641,7 @@ public final synchronized void doConfigSubmit( StaplerRequest req, StaplerRespon

JSONObject json = req.getSubmittedForm();

properties.rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());
getProperties().rebuild(req, req.getSubmittedForm(), getApplicablePropertyDescriptors());

save();

0 comments on commit ce9ef80

Please sign in to comment.