On 20/05/2026 08:02, [email protected] wrote:
This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new 4c360fce82 Fix EL standalone interface bean properties discovery
4c360fce82 is described below
commit 4c360fce827d848d69159e5ed56118fae410ead6
Author: remm <[email protected]>
AuthorDate: Wed May 20 09:01:57 2026 +0200
Fix EL standalone interface bean properties discovery
While the code in populateFromInterface() is incorrect, it doesn't
matter as the call is unnecessary in this case. getPropertyDescriptors()
uses Class.getMethods() which returns all default methods anyway.
The populateFromInterface() call is required for the Full JavaBeans
implementation.
So there is no bug here and the code can be removed. Which probably
explains why no-one has reported this as a bug.
I'll get that clean-up done shortly.
There is a test for this specific case that passes.
Mark
---
java/jakarta/el/BeanSupportStandalone.java | 2 +-
webapps/docs/changelog.xml | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/java/jakarta/el/BeanSupportStandalone.java
b/java/jakarta/el/BeanSupportStandalone.java
index c32c89e2b8..07a65b9c24 100644
--- a/java/jakarta/el/BeanSupportStandalone.java
+++ b/java/jakarta/el/BeanSupportStandalone.java
@@ -181,7 +181,7 @@ class BeanSupportStandalone extends BeanSupport {
private void populateFromInterfaces(Class<?> aClass) {
Class<?>[] interfaces = aClass.getInterfaces();
for (Class<?> ifs : interfaces) {
- PropertyDescriptor[] pds = getPropertyDescriptors(type);
+ PropertyDescriptor[] pds = getPropertyDescriptors(ifs);
for (PropertyDescriptor pd : pds) {
if (!this.properties.containsKey(pd.getName())) {
this.properties.put(pd.getName(), new
BeanPropertyStandalone(this.type, pd));
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index fd5b901ec6..51511e3a15 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -326,6 +326,9 @@
(markt)
</add>
<!-- Entries for backport and removal before 12.0.0-M1 below this line
-->
+ <fix>
+ Fix EL standalone interface bean properties discovery. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]