You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Pavel Rodionov (JIRA)" <ji...@apache.org> on 2007/12/10 12:33:33 UTC

[jira] Updated: (WW-2364) OGNL calling method with multiple params, when one of param is array

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

Pavel Rodionov updated WW-2364:
-------------------------------

    Description: 
When i use such tag 
<s:property value="%{getText('blabalbla.step1', new String[]{'aaaa', 'ass', 'sss'})}" escape="false" />
method with following signature is called 
public String getText(String s, String s1) 
But in OGNL specification said (according to http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/methods.html):
"OGNL calls methods a little differently from the way Java does, because OGNL is interpreted and must choose the right method at run time, with no extra type information aside from the actual arguments supplied. OGNL always chooses the most specific method it can find whose types match the supplied arguments; if there are two or more methods that are equally specific and match the given arguments, one of them will be chosen arbitrarily."
So, for my s:property must be called 
public String getText(String s, String[] strings)

  was:
When i use such tag 
<s:property value="%{getText('ojingo.blipback.mainpage.step1', new String[]{'aaaa', 'ass', 'sss'})}" escape="false" />
method with following signature is called 
public String getText(String s, String s1) 
But in OGNL specification said (according to http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/methods.html):
"OGNL calls methods a little differently from the way Java does, because OGNL is interpreted and must choose the right method at run time, with no extra type information aside from the actual arguments supplied. OGNL always chooses the most specific method it can find whose types match the supplied arguments; if there are two or more methods that are equally specific and match the given arguments, one of them will be chosen arbitrarily."
So, for my s:property must be called 
public String getText(String s, String[] strings)


> OGNL calling method with multiple params, when one of param is array
> --------------------------------------------------------------------
>
>                 Key: WW-2364
>                 URL: https://issues.apache.org/struts/browse/WW-2364
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Expression Language
>    Affects Versions: 2.1.0
>            Reporter: Pavel Rodionov
>
> When i use such tag 
> <s:property value="%{getText('blabalbla.step1', new String[]{'aaaa', 'ass', 'sss'})}" escape="false" />
> method with following signature is called 
> public String getText(String s, String s1) 
> But in OGNL specification said (according to http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/methods.html):
> "OGNL calls methods a little differently from the way Java does, because OGNL is interpreted and must choose the right method at run time, with no extra type information aside from the actual arguments supplied. OGNL always chooses the most specific method it can find whose types match the supplied arguments; if there are two or more methods that are equally specific and match the given arguments, one of them will be chosen arbitrarily."
> So, for my s:property must be called 
> public String getText(String s, String[] strings)

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