cap the size of the listing because the list will be otherwise too long.

Dynamic expansion like the one seen in the build history view would be great.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7321 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-03-05 02:08:38 +00:00
1 parent e0f0cd6762
commit dbf80b1753
2 files changed
+12 -1

No files matched your search

+10
View File
@@ -766,4 +766,14 @@ public class Functions {
assert context!=null;
return context;
}
/**
* Returns a sub-list if the given list is bigger than the specified 'maxSize'
*/
public static <T> List<T> subList(List<T> base, int maxSize) {
if(maxSize<base.size())
return base.subList(0,maxSize);
else
return base;
}
}