openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1565935 - /openwebbeans/branches/owb_1.2.x/webbeans-impl/src/main/java/org/apache/webbeans/proxy/NormalScopeProxyFactory.java
Date Sat, 08 Feb 2014 07:57:29 GMT
Author: rmannibucau
Date: Sat Feb  8 07:57:29 2014
New Revision: 1565935

URL: http://svn.apache.org/r1565935
Log:
reverting OWB-931 after my tests, sorry if it had any side effect for you

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=1565935&r1=1565934&r2=1565935&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
Sat Feb  8 07:57:29 2014
@@ -115,17 +115,18 @@ public class NormalScopeProxyFactory ext
 
     public <T> T createNormalScopeProxy(Bean<T> bean)
     {
-        ClassLoader classLoader = WebBeansUtil.getCurrentClassLoader();
-        if (classLoader == null)
+        final ClassLoader classLoader;
+        if (bean.getBeanClass() != null)
         {
-            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();
-            }
+            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();
         }
 
         Class<T> classToProxy;



Mime
View raw message