openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1565779 - /openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
Date Fri, 07 Feb 2014 19:58:32 GMT
Author: rmannibucau
Date: Fri Feb  7 19:58:32 2014
New Revision: 1565779

URL: http://svn.apache.org/r1565779
Log:
OWB-931 using tccl first in normal scope proxy factory - to port to trunk when validated against
tomee

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

Modified: openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
URL: http://svn.apache.org/viewvc/openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java?rev=1565779&r1=1565778&r2=1565779&view=diff
==============================================================================
--- openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
(original)
+++ openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
Fri Feb  7 19:58:32 2014
@@ -115,18 +115,17 @@ public class NormalScopeProxyFactory ext
 
     public <T> T createNormalScopeProxy(Bean<T> bean)
     {
-        final ClassLoader classLoader;
-        if (bean.getBeanClass() != null)
+        ClassLoader classLoader = WebBeansUtil.getCurrentClassLoader();
+        if (classLoader == null)
         {
-            classLoader = bean.getBeanClass().getClassLoader();
-        }
-        else if (OwbBean.class.isInstance(bean) && OwbBean.class.cast(bean).getReturnType()
!= null)
-        {
-            classLoader = OwbBean.class.cast(bean).getReturnType().getClassLoader();
-        }
-        else
-        {
-            classLoader = WebBeansUtil.getCurrentClassLoader();
+            if (bean.getBeanClass() != null)
+            {
+                classLoader = bean.getBeanClass().getClassLoader();
+            }
+            else if (OwbBean.class.isInstance(bean) && OwbBean.class.cast(bean).getReturnType()
!= null)
+            {
+                classLoader = OwbBean.class.cast(bean).getReturnType().getClassLoader();
+            }
         }
 
         Class<T> classToProxy;



Mime
View raw message