[
https://issues.apache.org/jira/browse/OWB-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Struberg updated OWB-960:
------------------------------
Fix Version/s: (was: 2.0.0)
1.5.0
> Proxying varargs methods not working
> ------------------------------------
>
> Key: OWB-960
> URL: https://issues.apache.org/jira/browse/OWB-960
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Interceptor and Decorators
> Affects Versions: 1.2.2
> Environment: Doesn't matter
> Reporter: Vojtech Zavrel
> Assignee: Mark Struberg
> Labels: easyfix
> Fix For: 1.2.6, 1.5.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> There is a problem when proxying varargs methods in OWB 1.2.x (at least 1.2.2
> and 1.2.4). Can you confirm it?
> The bahaviour is that java.lang.reflect.Method.isVarArgs() returns false (if
> the object is OWB proxied) even if the method has varargs MODIFIER. There is
> a simple solution with modification of classes NormalScopeProxy,
> InterceptorDecoratorProxyFactory and NormalScopeProxyFactory. The
> targetModifiers are calculated in noncomplete way. The right way is adding
> bitwise inclusive OR also for VARARGS modifier (which is not public in Java
> API).
> static final int VARARGS = 0x00000080;
> final int targetModifiers = delegatedMethod.getModifiers() &
> (Modifier.PROTECTED | Modifier.PUBLIC | VARARGS);
> Version 1.1.x that have bean using javaassist was fine. Same issue used to be
> in WELD (https://issues.jboss.org/browse/WELD-1141)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)