Catch AIOOBE reported by tuna http://zzz.i2p/topics/332

This commit is contained in:
zzz
2009-06-22 14:16:52 +00:00
parent 1fd5a20373
commit 917e1023e4

View File

@ -276,7 +276,14 @@ public class ControlPoint implements HTTPRequestListener
{
int nRoots = devNodeList.size();
for (int n=0; n<nRoots; n++) {
Node rootNode = devNodeList.getNode(n);
// AIOOB was thrown from here, maybe would be better to
// copy the list before traversal?
Node rootNode;
try {
rootNode = devNodeList.getNode(n);
} catch (ArrayIndexOutOfBoundsException aioob) {
break;
}
Device dev = getDevice(rootNode);
if (dev == null)
continue;