velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mike (JIRA)" <>
Subject [jira] Commented: (VELOCITY-132) IllegalArgumentException while calling an overloaded method
Date Wed, 04 Jan 2006 13:50:01 GMT
    [ ] 

mike commented on VELOCITY-132:

I just downloaded the actual nightly src and tested the bug with the files which I included
above. The fix dowsn't seem to solve the issue: In the old version (1.4) the output of the
test is

$ $param )

in the patched new version it is
$ $param )

which isn't correct either. The correct output should be

I don't think this is a minor bug so it should be fixed in 1.5 if in any case possible. If
you need further information about the bug please contact me. 

> IllegalArgumentException while calling an overloaded method
> -----------------------------------------------------------
>          Key: VELOCITY-132
>          URL:
>      Project: Velocity
>         Type: Bug
>   Components: Source
>     Versions: 1.3-rc1
>  Environment: Operating System: All
> Platform: All
>     Reporter: MySign
>      Fix For: 1.5
>  Attachments: velocity_patch.patch
> 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
> $ $someObj.getNull() )
> $ $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

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message