You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2014/06/01 13:08:01 UTC

[jira] [Resolved] (OWB-960) Proxying varargs methods not working

     [ https://issues.apache.org/jira/browse/OWB-960?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved OWB-960.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.2.6

txs for the report!

Should work now in owb-1.2.x branch (will be released with 1.2.6) and trunk (2.0.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, 2.0.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.2#6252)