提交 633e5c36 编写于 作者: J Jukka Lehtniemi 提交者: Kohsuke Kawaguchi

[FIXED JENKINS-15487] Override put() method in RunMap

Implementation according to Jesse Glick's comments on the issue.
上级 f8ac5cad
......@@ -55,6 +55,9 @@ Upcoming changes</a>
<!-- 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
......
......@@ -172,6 +172,11 @@ public final class RunMap<R extends Run<?,R>> extends AbstractLazyLoadRunMap<R>
return r.getId();
}
@Override
public R put(R r) {
return super._put(r);
}
/**
* Reuses the same reference as much as we can.
* <p>
......
......@@ -502,7 +502,11 @@ public abstract class AbstractLazyLoadRunMap<R> extends AbstractMap<Integer,R> i
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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册