Avoid NPE.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1742 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2005-12-11 23:06:35 +00:00
parent 51bf055fbd
commit cd1515cb21
@@ -26,7 +26,7 @@ public class DataTool
*/ */
public Object get (Object array, int index) public Object get (Object array, int index)
{ {
return Array.get(array, index); return (array == null) ? null : Array.get(array, index);
} }
/** /**
@@ -34,7 +34,7 @@ public class DataTool
*/ */
public int length (Object array) public int length (Object array)
{ {
return Array.getLength(array); return (array == null) ? 0 : Array.getLength(array);
} }
/** /**