You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "rzo1 (via GitHub)" <gi...@apache.org> on 2026/07/08 18:43:12 UTC
[PR] OWB-1465 - Preserve ACC_BRIDGE / ACC_SYNTHETIC on bridge methods re-declared by normal scope proxies [openwebbeans]
rzo1 opened a new pull request, #140:
URL: https://github.com/apache/openwebbeans/pull/140
NormalScopeProxyFactory re-declares the JVM bridge methods of the proxied class but masked the method modifiers with PROTECTED | PUBLIC | VARARGS, dropping the ACC_BRIDGE flag. The proxy then exposed two regular methods with the same name and assignable parameter types, which breaks overload resolution in EL implementations (jakarta.el / Tomcat's ReflectionUtil tie-break on Method#isBridge()) with 'Unable to find unambiguous method'.
Keep ACC_BRIDGE and ACC_SYNTHETIC in both generation paths (delegateNonInterceptedMethods for public methods, generateDelegationMethod for protected ones). Introduces MODIFIER_BRIDGE / MODIFIER_SYNTHETIC constants next to the existing MODIFIER_VARARGS as java.lang.reflect.Modifier does not expose them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OWB-1465 - Preserve ACC_BRIDGE / ACC_SYNTHETIC on bridge methods re-declared by normal scope proxies [openwebbeans]
Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #140:
URL: https://github.com/apache/openwebbeans/pull/140#discussion_r3546673183
##########
webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java:
##########
@@ -395,7 +395,10 @@ protected void delegateNonInterceptedMethods(ClassLoader classLoader, ClassWrite
exceptionTypeNames[i] = Type.getType(exceptionTypes[i]).getInternalName();
Review Comment:
but it can't be abstract, cant be native, can't be final, can't be static, can't be private at that point in code. I'm not 100% sure about synchronized (guess you're right but also that the impact is almost 0 in practise)
so from my window we just forward them
maybe final has a particular case but it should be explicitly handled if the input method is final only IMHO
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OWB-1465 - Preserve ACC_BRIDGE / ACC_SYNTHETIC on bridge methods re-declared by normal scope proxies [openwebbeans]
Posted by "rmannibucau (via GitHub)" <gi...@apache.org>.
rmannibucau commented on code in PR #140:
URL: https://github.com/apache/openwebbeans/pull/140#discussion_r3546505201
##########
webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java:
##########
@@ -395,7 +395,10 @@ protected void delegateNonInterceptedMethods(ClassLoader classLoader, ClassWrite
exceptionTypeNames[i] = Type.getType(exceptionTypes[i]).getInternalName();
Review Comment:
do we have the list of modifiers we want to drop? from the dozen of modifiers I did review we already filter the ones we dont' want before so we can almost passthrough or just force the ones we don't want if any no?
side note: we might extract the constant (`Modifier.PROTECTED | Modifier.PUBLIC | MODIFIER_VARARGS | MODIFIER_BRIDGE | MODIFIER_SYNTHETIC` for ex) instead of inlining it everytime.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OWB-1465 - Preserve ACC_BRIDGE / ACC_SYNTHETIC on bridge methods re-declared by normal scope proxies [openwebbeans]
Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on code in PR #140:
URL: https://github.com/apache/openwebbeans/pull/140#discussion_r3546579635
##########
webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java:
##########
@@ -395,7 +395,10 @@ protected void delegateNonInterceptedMethods(ClassLoader classLoader, ClassWrite
exceptionTypeNames[i] = Type.getType(exceptionTypes[i]).getInternalName();
Review Comment:
Concretely that would be something like `modifiers & ~(Modifier.ABSTRACT | Modifier.SYNCHRONIZED | Modifier.NATIVE)`: ABSTRACT must go because the proxy method gets a body (interface methods arrive abstract), SYNCHRONIZED shouldn't be copied onto a delegating method (it would sync on the proxy instance, a semantics change; the real method still synchronizes), NATIVE for safety even though it's pre-filtered (didn't actually look that up). WDYT @struberg @tandraschko ?
Meanwhile, I have extracted the modifiers set in a constant.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OWB-1465 - Preserve ACC_BRIDGE / ACC_SYNTHETIC on bridge methods re-declared by normal scope proxies [openwebbeans]
Posted by "struberg (via GitHub)" <gi...@apache.org>.
struberg commented on code in PR #140:
URL: https://github.com/apache/openwebbeans/pull/140#discussion_r3564680432
##########
webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java:
##########
@@ -395,7 +395,10 @@ protected void delegateNonInterceptedMethods(ClassLoader classLoader, ClassWrite
exceptionTypeNames[i] = Type.getType(exceptionTypes[i]).getInternalName();
Review Comment:
the whole NormalProxying stuff relies on subclassing. You just cannot overwrite a final method in a subclass...
Hope I get to review this over the weekend.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OWB-1465 - Preserve ACC_BRIDGE / ACC_SYNTHETIC on bridge methods re-declared by normal scope proxies [openwebbeans]
Posted by "struberg (via GitHub)" <gi...@apache.org>.
struberg merged PR #140:
URL: https://github.com/apache/openwebbeans/pull/140
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] OWB-1465 - Preserve ACC_BRIDGE / ACC_SYNTHETIC on bridge methods re-declared by normal scope proxies [openwebbeans]
Posted by "rzo1 (via GitHub)" <gi...@apache.org>.
rzo1 commented on code in PR #140:
URL: https://github.com/apache/openwebbeans/pull/140#discussion_r3546615137
##########
webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java:
##########
@@ -395,7 +395,10 @@ protected void delegateNonInterceptedMethods(ClassLoader classLoader, ClassWrite
exceptionTypeNames[i] = Type.getType(exceptionTypes[i]).getInternalName();
Review Comment:
Perhaps the "allowlist" approach would also be a good follow-up but I let you decide how we handle it :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@openwebbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org