first build and last build were swapped.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@34057 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2010-08-23 21:26:40 +00:00
1 parent 0e004fa054
commit 9ec00e3afc
1 file changed
+3 -3
+3 -3
View File
@@ -42,7 +42,7 @@ import java.util.Iterator;
import java.util.List;
/**
* {@link List} of {@link Run}s, sorted in the date order.
* {@link List} of {@link Run}s, sorted in the descending date order.
*
* TODO: this should be immutable
*
@@ -57,11 +57,11 @@ public class RunList<R extends Run> extends ArrayList<R> {
}
public R getFirstBuild() {
return isEmpty() ? null : get(0);
return isEmpty() ? null : get(size()-1);
}
public R getLastBuild() {
return isEmpty() ? null : get(size()-1);
return isEmpty() ? null : get(0);
}
public RunList(View view) {// this is a type unsafe operation