Cope with a null list in ListUtil.size().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@1523 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -466,6 +466,9 @@ public class ListUtil
|
|||||||
*/
|
*/
|
||||||
public static int size (Object[] list)
|
public static int size (Object[] list)
|
||||||
{
|
{
|
||||||
|
if (list == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
int llength = list.length;
|
int llength = list.length;
|
||||||
for (int ii = 0; ii < llength; ii++) {
|
for (int ii = 0; ii < llength; ii++) {
|
||||||
if (list[ii] == null) {
|
if (list[ii] == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user