openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1798079 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans: intercept/ConstructorInterceptorInvocationContext.java portable/InjectionTargetImpl.java
Date Thu, 08 Jun 2017 15:24:06 GMT
Author: rmannibucau
Date: Thu Jun  8 15:24:06 2017
New Revision: 1798079

URL: http://svn.apache.org/viewvc?rev=1798079&view=rev
Log:
fixing previous commit tck regressions

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ConstructorInterceptorInvocationContext.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ConstructorInterceptorInvocationContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ConstructorInterceptorInvocationContext.java?rev=1798079&r1=1798078&r2=1798079&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ConstructorInterceptorInvocationContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/ConstructorInterceptorInvocationContext.java
Thu Jun  8 15:24:06 2017
@@ -42,18 +42,6 @@ public class ConstructorInterceptorInvoc
 
     public Object getNewInstance()
     {
-        if (newInstance == null)
-        {
-            try
-            {
-                directProceed();
-                return newInstance;
-            }
-            catch (final Exception e)
-            {
-                throw ExceptionUtil.throwAsRuntimeException(e);
-            }
-        }
         return newInstance;
     }
 

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java?rev=1798079&r1=1798078&r2=1798079&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/portable/InjectionTargetImpl.java
Thu Jun  8 15:24:06 2017
@@ -162,7 +162,13 @@ public class InjectionTargetImpl<T> exte
                         provider, aroundConstructInterceptors, interceptorInstances, cons,
injectableConstructor.createParameters());
                 provider.setContext(invocationContext);
                 invocationContext.proceed();
-                return (T) invocationContext.getNewInstance();
+                Object newInstance = invocationContext.getNewInstance();
+                if (newInstance == null)
+                {
+                    invocationContext.directProceed();
+                    newInstance = invocationContext.getNewInstance();
+                }
+                return (T) newInstance;
             }
             catch (final Exception e) // CDI 1.0
             {



Mime
View raw message