tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1142953 - in /tomcat/trunk: java/javax/el/BeanELResolver.java webapps/docs/changelog.xml
Date Tue, 05 Jul 2011 10:21:32 GMT
2011/7/5  <markt@apache.org>:
> Author: markt
> Date: Tue Jul  5 10:03:06 2011
> New Revision: 1142953
>
> URL: http://svn.apache.org/viewvc?rev=1142953&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51472
> Correctly test modifiers when resolving bean methods with the BeanELResolver.
> Patch provided by Friedhelm Kuehn.
>
> Modified:
>    tomcat/trunk/java/javax/el/BeanELResolver.java
>    tomcat/trunk/webapps/docs/changelog.xml



>     private static final Method getMethod(Class<?> type, Method m) {
> -        if (m == null || Modifier.isPublic(type.getModifiers())) {
> +        if (m == null || Modifier.isPublic(m.getModifiers())) {

I think the old code is the correct one.

See that below that in BeanELResolver.getMethod() we call
Class..getMethod(...)  which returns only public methods.

If I understand it correctly BeanELResolver.getMethod() checks that
 - either the class declaring the method is public, or
 - the method is a public one declared in a public parent or public
interface implemented by this class.


Best regards,
Konstantin Kolinko

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


Mime
View raw message