geirm 01/01/24 06:59:42
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTObjectArray.java
Log:
Changed value() to return an ArrayList rather than Object []. This is something
that had discussed on the list and no one protested. Actually, no one answered. Will
follow with post to list to warn people again.
Revision Changes Path
1.3 +4 -2
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java
Index: ASTObjectArray.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTObjectArray.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTObjectArray.java 2001/01/03 05:27:37 1.2
+++ ASTObjectArray.java 2001/01/24 14:59:40 1.3
@@ -55,6 +55,8 @@
package org.apache.velocity.runtime.parser.node;
+import java.util.ArrayList;
+
import org.apache.velocity.context.InternalContextAdapter;
import org.apache.velocity.runtime.parser.Parser;
@@ -81,11 +83,11 @@
{
int size = jjtGetNumChildren();
- Object[] objectArray = new Object[size];
+ ArrayList objectArray = new ArrayList();
for (int i = 0; i < size; i++)
{
- objectArray[i] = jjtGetChild(i).value(context);
+ objectArray.add( jjtGetChild(i).value(context) );
}
return objectArray;