Skip to content

Commit 633e5c3

Browse files
jlehtniekohsuke
authored andcommittedDec 10, 2012
[FIXED JENKINS-15487] Override put() method in RunMap
Implementation according to Jesse Glick's comments on the issue.
1 parent f8ac5ca commit 633e5c3

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed
 

‎changelog.html

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
<!-- Record your changes in the trunk here. -->
5656
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
5757
<ul class=image>
58+
<li class=bug>
59+
Fixed <tt>java.lang.NoSuchMethodError: hudson.model.RunMap.put(Lhudson/model/Run;)Lhudson/model/Run;</tt>
60+
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15487">issue 15487</a>)
5861
<li class=bug>
5962
Saving the update center list after the metadata has been fetched results in
6063
the metadata being persisted twice

‎core/src/main/java/hudson/model/RunMap.java

+5
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ protected final String getIdOf(R r) {
172172
return r.getId();
173173
}
174174

175+
@Override
176+
public R put(R r) {
177+
return super._put(r);
178+
}
179+
175180
/**
176181
* Reuses the same reference as much as we can.
177182
* <p>

‎core/src/main/java/jenkins/model/lazy/AbstractLazyLoadRunMap.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,11 @@ public R getByNumber(int n) {
502502
return search(n,Direction.EXACT);
503503
}
504504

505-
public final R put(R value) {
505+
public R put(R value) {
506+
return _put(value);
507+
}
508+
509+
protected R _put(R value) {
506510
return put(getNumberOf(value),value);
507511
}
508512

0 commit comments

Comments
 (0)
Please sign in to comment.