openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1602748 - /openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractDecoratorInjectionTarget.java
Date Sun, 15 Jun 2014 18:24:50 GMT
Author: rmannibucau
Date: Sun Jun 15 18:24:50 2014
New Revision: 1602748

URL: http://svn.apache.org/r1602748
Log:
OWB-970 using class classloader to create a proxy and not OWB classloader

Modified:
    openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractDecoratorInjectionTarget.java

Modified: openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractDecoratorInjectionTarget.java
URL: http://svn.apache.org/viewvc/openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractDecoratorInjectionTarget.java?rev=1602748&r1=1602747&r2=1602748&view=diff
==============================================================================
--- openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractDecoratorInjectionTarget.java
(original)
+++ openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/portable/AbstractDecoratorInjectionTarget.java
Sun Jun 15 18:24:50 2014
@@ -43,8 +43,13 @@ public class AbstractDecoratorInjectionT
     protected AnnotatedConstructor<T> createConstructor()
     {
         // create proxy subclass
-        ClassLoader classLoader = getClass().getClassLoader();
         Class<T> classToProxy = annotatedType.getJavaClass();
+        ClassLoader classLoader = classToProxy.getClassLoader();
+        if (classLoader == null)
+        {
+            classLoader = Thread.currentThread().getContextClassLoader();
+        }
+
 
         proxySubClass = webBeansContext.getSubclassProxyFactory().createImplementedSubclass(classLoader,
classToProxy);
 



Mime
View raw message