You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org> on 2007/03/08 01:04:32 UTC

[jira] Closed: (VELOCITY-132) IllegalArgumentException while calling an overloaded method

     [ https://issues.apache.org/jira/browse/VELOCITY-132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henning Schmiedehausen closed VELOCITY-132.
-------------------------------------------


> IllegalArgumentException while calling an overloaded method
> -----------------------------------------------------------
>
>                 Key: VELOCITY-132
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-132
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.3-rc1
>         Environment: Operating System: All
> Platform: All
>            Reporter: MySign
>             Fix For: 1.5
>
>         Attachments: includecall.vm, velocity_patch.patch, velocitybug.vm, VelocityCachingBug.java
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org