geirm 00/11/22 04:45:32
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTMethod.java
Log:
A better way (maybe even the right way...) to handle the void return type. :)
Revision Changes Path
1.6 +3 -3
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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ASTMethod.java 2000/11/22 12:11:59 1.5
+++ ASTMethod.java 2000/11/22 12:45:32 1.6
@@ -64,7 +64,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
- * @version $Id: ASTMethod.java,v 1.5 2000/11/22 12:11:59 geirm Exp $
+ * @version $Id: ASTMethod.java,v 1.6 2000/11/22 12:45:32 geirm Exp $
*/
package org.apache.velocity.runtime.parser.node;
@@ -156,8 +156,8 @@
if (obj == null)
{
- if (method.getReturnType().toString().equals("void"))
- return new String("");
+ if( method.getReturnType() == Void.TYPE)
+ return new String("");
}
return obj;