openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject [openwebbeans] 01/02: OWB-1297 remove parentCreationalContext from the InstanceImpl alltogether
Date Wed, 11 Sep 2019 14:31:08 GMT
This is an automated email from the ASF dual-hosted git repository.

struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git

commit f8847cc339437e87238518a9b7488b868708b6ec
Author: Mark Struberg <struberg@apache.org>
AuthorDate: Wed Sep 11 14:28:19 2019 +0200

    OWB-1297 remove parentCreationalContext from the InstanceImpl alltogether
---
 .../org/apache/webbeans/inject/instance/InstanceImpl.java     | 11 +++--------
 .../java/org/apache/webbeans/portable/InstanceProducer.java   |  2 +-
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/inject/instance/InstanceImpl.java
b/webbeans-impl/src/main/java/org/apache/webbeans/inject/instance/InstanceImpl.java
index 7fb53f4..1219a42 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/inject/instance/InstanceImpl.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/inject/instance/InstanceImpl.java
@@ -76,7 +76,6 @@ public class InstanceImpl<T> implements Instance<T>, Serializable
     private WebBeansContext webBeansContext;
 
     private Map<Object, CreationalContextImpl<?>> creationalContexts;
-    private CreationalContextImpl<?> parentCreationalContext;
 
     private boolean strictValidation;
 
@@ -86,15 +85,12 @@ public class InstanceImpl<T> implements Instance<T>, Serializable
      * @param injectionClazz injection class type
      * @param injectionPoint null or injection point
      * @param webBeansContext
-     * @param creationalContext will get used for creating &#064;Dependent beans
      * @param qualifiers qualifier annotations
      */
-    public InstanceImpl(Type injectionClazz, InjectionPoint injectionPoint, WebBeansContext
webBeansContext,
-                 CreationalContextImpl<?> creationalContext, Annotation... qualifiers)
+    public InstanceImpl(Type injectionClazz, InjectionPoint injectionPoint, WebBeansContext
webBeansContext, Annotation... qualifiers)
     {
         this.injectionClazz = injectionClazz;
         this.injectionPoint = injectionPoint;
-        parentCreationalContext = creationalContext;
 
         this.webBeansContext = webBeansContext;
         strictValidation = webBeansContext.getOpenWebBeansConfiguration().strictDynamicValidation();
@@ -192,7 +188,7 @@ public class InstanceImpl<T> implements Instance<T>, Serializable
         Annotation[] newQualifiersArray = qualifiers;
         return new InstanceImpl<>(
             injectionClazz, injectionPoint == null ? null : new InstanceInjectionPoint(injectionPoint,
newQualifiersArray),
-            webBeansContext, parentCreationalContext, newQualifiersArray);
+            webBeansContext, newQualifiersArray);
     }
 
     /**
@@ -220,7 +216,7 @@ public class InstanceImpl<T> implements Instance<T>, Serializable
             ? qualifiers
             : qualifierAnnotations.toArray(new Annotation[qualifierAnnotations.size()]);
 
-        return new InstanceImpl<>(sub, injectionPoint, webBeansContext, parentCreationalContext,
effectiveQualifiers);
+        return new InstanceImpl<>(sub, injectionPoint, webBeansContext, effectiveQualifiers);
     }
 
     /**
@@ -329,7 +325,6 @@ public class InstanceImpl<T> implements Instance<T>, Serializable
         injectionClazz = (Type)inputStream.readObject();
         qualifierAnnotations = (Set<Annotation>)inputStream.readObject();
         injectionPoint = (InjectionPoint) inputStream.readObject();
-        parentCreationalContext = webBeansContext.getBeanManagerImpl().createCreationalContext(null);
// TODO: check what we can do
     }
     
     public String toString()
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/portable/InstanceProducer.java
b/webbeans-impl/src/main/java/org/apache/webbeans/portable/InstanceProducer.java
index 8775884..abd03b5 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/portable/InstanceProducer.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/portable/InstanceProducer.java
@@ -77,7 +77,7 @@ public class InstanceProducer<T> extends AbstractProducer<Instance<T>>
                 type = Object.class;
             }
 
-            return new InstanceImpl<>(type, injectionPoint, webBeansContext, creationalContextImpl,
qualifiers.toArray(new Annotation[qualifiers.size()]));
+            return new InstanceImpl<>(type, injectionPoint, webBeansContext, qualifiers.toArray(new
Annotation[qualifiers.size()]));
         }
         finally
         {


Mime
View raw message