mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 18:46:41 +00:00
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:
1 parent
e0f0cd6762
commit
dbf80b1753
2 files changed
+12
-1
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user