2011/12/22 Paul Nicolucci <pnico...@us.ibm.com>:
> Thanks for the response, I'll try to clarify as best I can and can provide
> a test case directly if needed ( since the mailing list strips attachments,
> sorry about that  I was unaware ).
>
> -We are experiencing this problem on Websphere Application Server V8 which
> included a snap shot of the org.apache.el code.
>
> - This problem only seems to happen after we pulled in the following fix
> for org.apache.el code :
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51177
>
> - It seems that if we try to pass a parameter using JSF to a method using
> the EL when using a value stored in a Map then we always look for a method
> signature having Object type parameters since the MapELResolver.getType()
> always returns Object.class now.
>
> What further information can I provide?  Should I open a JIRA issue with
> more details and attach a test case there ?
>

1. If you can provide a simple sample application that demonstrates
the issue on a clean installation of Tomcat 7.0.23, then please open
an issue in Bugzilla and attach it there.
(So that we can fix it and a test to our testsuite).
http://tomcat.apache.org/bugreport.html

2. Regarding BZ 51177 fix as far as I remember (without looking at
commit logs), the old code was looking up the actual type of element
contained in the map or in the list, which is just plainly wrong.
There is specification fragment cited in
https://issues.apache.org/bugzilla/show_bug.cgi?id=51177#c0

Regarding your use case where target class contains no "foo(Object)"
method, from pure logic I would expect "foo(String)" to be found (if
it is the only candidate) and then a classcast to be attempted,  but I
would like to see some quote from specification (from PDFs or from
Javadoc) to support that.

A close match is from page #34 (48 of 130) of
expression_language-2_2-mrel-spec.pdf regarding BeanELResolver

[quote]
For method resolution, the method string is the name of the method in
the bean. The parameter types can be
optionally specified to identify the method. If the parameter types
are not specified, the parameter objects are
used in the method resolution.
[/quote]

and page #38 (52 of 130)

[quote]
The provided method object will first be coerced to a String. The
methods in the bean is then examined
and an attempt will be made to select one for invocation. If no
suitable can be found, a
MethodNotFoundException is thrown. If the given paramTypes is not
null, select the method with
the given name and parameter types. Else select the method with the
given name that has the same number
of parameters. If there are more than one such method, the method
selection process is undefined.
(...)
[/quote]

So the method name and the count of parameters is what matters.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to