foursquare/heapaudit — pull request #5 by sfraser (2012-03-14 00:54:18+00:00)
Title: Patches to HeapUtil to keep it from throwing NPE on allocations of multidim arrays

Heaputil was throwning NPE's on allocations of arrays with multiple dimensions where
not all dimensions were specified. For example:

int[][][] arrayI = new int[3][5][];

You can try taking my updates to the unit test TestMULTIARRAY first and you will see
NPE's are thrown in HeapUtil and other tests fail.

If you then apply my patch to HeapUtil all should run clean.

I am not sure if the numbers are accurate on the heap usage of these multidim arrays,
but it looks roughly correct, and at the least this is a good start to having heaputil support
them.

Future todo - add more tests of arrays of all types.