PROBLEM:
HessianReader.readList() inserts extra 'null' elements in AS3 Array when reading a nested list.
REPRODUCTION:
On the server side, a servlet returns a simple 2-dimensional array as follows:
String[][] ttt = {{"a","b"},{"c","d"}};
When this is parsed by the HessianReader class, an extra 'null' element is inserted into the AS3 Array after parsing {"a","b"} and {"c","d"} respectively.
Specifically, it appears that the last 'z' is not consumed by HessianReader. Note that this problem does not occur for a 1-dimensional array.
WORK-AROUND:
To consume the extra 'z', the following line was added to HessianReader.readList():
for (i = 0; i < length; i++)
array[i] = read();
$(); // <---- ADDED THIS LINE
NOTE: this may not be the best implementation, but at least for now it appears to solve the problem.