openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vojtěch Zavřel <>
Subject Proxying varargs methods
Date Wed, 28 May 2014 09:25:59 GMT
  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 (


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
Certifikace ISO 9001, ISO 8000, ISO 27001 a ČOS 051622 (AQAP 2110)

View raw message