From 04bcc845efd7ad48bfa5284e4c627307dce4d668 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 25 Sep 2002 12:42:53 +0000 Subject: [PATCH] Fixed emberassing bug in prefetchChildren() array index calculation. (I knew I was too overworked when I wrote the code!) --- src/helma/objectmodel/db/Node.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/helma/objectmodel/db/Node.java b/src/helma/objectmodel/db/Node.java index 1a52b479..f87c33a6 100644 --- a/src/helma/objectmodel/db/Node.java +++ b/src/helma/objectmodel/db/Node.java @@ -1249,12 +1249,15 @@ public final class Node implements INode, Serializable { loadNodes (); if (subnodes == null) return; + if (startIndex >= subnodes.size()) + return; int l = Math.min (subnodes.size()-startIndex, length); if (l < 1) return; Key[] keys = new Key[l]; - for (int i=startIndex; i