Hi,
it seems that 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)

Regards

Vojtěch Zavřel

--
Mgr. Vojtěch Zavřel
System architect
AURA, s.r.o.
Úvoz 499/56
602 00 Brno
Czech Republic

Tel.: +420 544 508 181
Fax: +420 544 508 112
E-mail: [email protected]
Internet: www.aura.cz
Certifikace ISO 9001, ISO 8000, ISO 27001 a ČOS 051622 (AQAP 2110)

Reply via email to