jvanzyl 00/11/01 10:19:29
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTMethod.java
Log:
- if introspection fails pass null back to ASTReference so that we don't get
an NPE, and so that a ReferenceException will be logged by ASTReference.
Revision Changes Path
1.4 +4 -2
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
Index: ASTMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ASTMethod.java 2000/10/31 02:49:49 1.3
+++ ASTMethod.java 2000/11/01 18:19:28 1.4
@@ -49,9 +49,11 @@
for (int j = 0; j < paramCount; j++)
params[j] = jjtGetChild(j + 1).value(context);
- //method = Introspector.getMethod((Class) data, methodName, paramCount);
method = Introspector.getMethod((Class) data, methodName, params);
-
+
+ if (method == null)
+ return null;
+
return method.getReturnType();
}