mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
ouch. this bug hurts.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3016 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
e95bd4fb6f
commit
d26c38ebfd
1 file changed
+1
-1
@@ -330,7 +330,7 @@ public abstract class Job<JobT extends Job<JobT,RunT>, RunT extends Run<JobT,Run
|
||||
* gone (deleted, rotated, etc.)
|
||||
*/
|
||||
public final RunT getNearestBuild(int n) {
|
||||
SortedMap<Integer, ? extends RunT> m = _getRuns().headMap(n);
|
||||
SortedMap<Integer, ? extends RunT> m = _getRuns().headMap(n-1); // the map should include n, so n-1
|
||||
if(m.isEmpty()) return null;
|
||||
return m.get(m.lastKey());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user