You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/07/05 12:03:06 UTC
svn commit: r1142953 - in /tomcat/trunk: java/javax/el/BeanELResolver.java
webapps/docs/changelog.xml
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
Modified: tomcat/trunk/java/javax/el/BeanELResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=1142953&r1=1142952&r2=1142953&view=diff
==============================================================================
--- tomcat/trunk/java/javax/el/BeanELResolver.java (original)
+++ tomcat/trunk/java/javax/el/BeanELResolver.java Tue Jul 5 10:03:06 2011
@@ -312,7 +312,7 @@ public class BeanELResolver extends ELRe
}
private static final Method getMethod(Class<?> type, Method m) {
- if (m == null || Modifier.isPublic(type.getModifiers())) {
+ if (m == null || Modifier.isPublic(m.getModifiers())) {
return m;
}
Class<?>[] inf = type.getInterfaces();
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1142953&r1=1142952&r2=1142953&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Tue Jul 5 10:03:06 2011
@@ -84,6 +84,14 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>51472</bug>: Correctly test modifiers when resolving bean methods
+ with the BeanELResolver. Patch provided by Friedhelm Kuehn. (markt)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Other">
<changelog>
<fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1142953 - in /tomcat/trunk: java/javax/el/BeanELResolver.java
webapps/docs/changelog.xml
Posted by Mark Thomas <ma...@apache.org>.
On 05/07/2011 11:21, Konstantin Kolinko wrote:
> 2011/7/5 <ma...@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.
I think you're right.
> See that below that in BeanELResolver.getMethod() we call
> Class..getMethod(...) which returns only public methods.
I was looking at the calls to desciptor.get[Read|Write]Method and didn't
follow the code far enough to find the limit to just public methods.
I'll revert the patch.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: svn commit: r1142953 - in /tomcat/trunk: java/javax/el/BeanELResolver.java
webapps/docs/changelog.xml
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/7/5 <ma...@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