[ https://issues.apache.org/jira/browse/VELOCITY-651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12652979#action_12652979 ]
Nathan Bubna commented on VELOCITY-651: --------------------------------------- Quite the nasty little reflection bug you've found. This will definitely warrant a 1.6.1 release. :-( I really wish this had been discovered two weeks ago. Oh well... There are two underlying problems. First, MethodMap is bizarrely matching a get(String,List) call to the get(String,String,Object[]) method. That's the worst part. Subsequent to that, though, VelMethodImpl--thinking this is a vararg call there are only 2 args for a 3 arg method that ends with an array arg--mishandles the arguments, trying to pass too few in. I've fixed this latter bug, but i'm still working on the former one. just fyi... > Velocity 1.6 does not work with Struts MessageTool 1.4 > ------------------------------------------------------ > > Key: VELOCITY-651 > URL: https://issues.apache.org/jira/browse/VELOCITY-651 > Project: Velocity > Issue Type: Bug > Components: Engine > Affects Versions: 1.6 > Environment: Velocity 1.6, Struts MessageTool 1.4, Struts 1.2.9, Java > 1.6_10 > Reporter: Stephan Schmid > > The org.apache.velocity.tools.struts.MessageTool of VelocityTools version 1.4 > contains a method signature of String get(String key, Object args[]). > With Velocity 1.5, one could use a Struts resource, such as > test1=this is a {0} > in a Velocity template with > $text.get('test1', ['TEST']) > that would render the text > this is a TEST > Unfortunately, since the released version 1.6 I get the following exception: > Invocation of method 'get' in class > org.apache.velocity.tools.struts.MessageTool threw exception > java.lang.IllegalArgumentException: wrong number of arguments at .. > The setting of the property runtime.references.strict has no influence. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]