Details
Description
If there are two methods with the same name and different parameters like:
public class myClass
{
public String foo ( Integer intObj );
public String foo ( String str );
}
and a velocity template like this
$myObj.foo( $someObj.getNull() )
$myObj.foo( $str )
while $someObj.getNull() returns null and $str is a java.lang.String object
with a String like 'test'. Because velocity caches the first method with the
Integer argument on calling with the parameter null (which isn't of course of
any type/class) the call fails with the String argument, because velocity tries
to call the foo( Integer intObj )!
In the velocity log appears a IllegalArgumentException which is right, but
velocity should call the right method!
mike
Attachments
Attachments
Issue Links
- is duplicated by
-
VELOCITY-389 IllegalArgumentException while calling an overloaded method
- Closed