Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-15487] Override put() method in RunMap
Implementation according to Jesse Glick's comments on the issue.
  • Loading branch information
jlehtnie authored and kohsuke committed Dec 10, 2012
1 parent f8ac5ca commit 633e5c3
Show file tree
Hide file tree
Showing 3 changed files with 13 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 <tt>java.lang.NoSuchMethodError: hudson.model.RunMap.put(Lhudson/model/Run;)Lhudson/model/Run;</tt>
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15487">issue 15487</a>)
<li class=bug>
Saving the update center list after the metadata has been fetched results in
the metadata being persisted twice
Expand Down
5 changes: 5 additions & 0 deletions core/src/main/java/hudson/model/RunMap.java
Expand Up @@ -172,6 +172,11 @@ protected final String getIdOf(R r) {
return r.getId();
}

@Override
public R put(R r) {
return super._put(r);
}

/**
* Reuses the same reference as much as we can.
* <p>
Expand Down
Expand Up @@ -502,7 +502,11 @@ public R getByNumber(int n) {
return search(n,Direction.EXACT);
}

public final R put(R value) {
public R put(R value) {
return _put(value);
}

protected R _put(R value) {
return put(getNumberOf(value),value);
}

Expand Down

0 comments on commit 633e5c3

Please sign in to comment.