Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-9367] persistence problem in View$PropertyList
  • Loading branch information
kohsuke committed May 13, 2011
1 parent c2f7623 commit 4bfdb1e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -55,6 +55,9 @@
<!-- Record your changes in the trunk here. -->
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
<ul class=image>
<li class=bug>
Fixed a persistence problem in <tt>View$PropertyList</tt>
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9367">issue 9367</a>)
</ul>
</div><!--=TRUNK-END=-->

Expand Down
3 changes: 2 additions & 1 deletion core/src/main/java/hudson/model/ListView.java
Expand Up @@ -91,7 +91,8 @@ public ListView(String name, ViewGroup owner) {
this.owner = owner;
}

private Object readResolve() {
protected Object readResolve() {
super.readResolve();
if(includeRegex!=null)
includePattern = Pattern.compile(includeRegex);
initColumns();
Expand Down
9 changes: 9 additions & 0 deletions core/src/main/java/hudson/model/View.java
Expand Up @@ -129,6 +129,15 @@ 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.
*/
Expand Down

0 comments on commit 4bfdb1e

Please sign in to comment.