openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1084290 - in /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational: CreationalContextImpl.java DependentCreationalContext.java
Date Tue, 22 Mar 2011 18:36:59 GMT
Author: struberg
Date: Tue Mar 22 18:36:59 2011
New Revision: 1084290

URL: http://svn.apache.org/viewvc?rev=1084290&view=rev
Log:
OWB-530 also synchronize the decorator logic

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/DependentCreationalContext.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java?rev=1084290&r1=1084289&r2=1084290&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java
Tue Mar 22 18:36:59 2011
@@ -245,18 +245,21 @@ public class CreationalContextImpl<T> im
             return null;
         }
 
-        List<DependentCreationalContext<?>> values = this.dependentObjects.get(ownerInstance);
-        if (values != null && values.size() > 0)
+        synchronized(this)
         {
-            Iterator<DependentCreationalContext<?>> it = values.iterator();
-            while (it.hasNext())
+            List<DependentCreationalContext<?>> values = this.dependentObjects.get(ownerInstance);
+            if (values != null && values.size() > 0)
             {
-                DependentCreationalContext<?> dc = it.next();
-
-                if(dc.getDependentType().equals(DependentType.DECORATOR) &&
-                   dc.getContextual().equals(decorator))
+                Iterator<DependentCreationalContext<?>> it = values.iterator();
+                while (it.hasNext())
                 {
-                    return dc.getInstance();
+                    DependentCreationalContext<?> dc = it.next();
+
+                    if(dc.getDependentType().equals(DependentType.DECORATOR) &&
+                       dc.getContextual().equals(decorator))
+                    {
+                        return dc.getInstance();
+                    }
                 }
             }
         }

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/DependentCreationalContext.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/DependentCreationalContext.java?rev=1084290&r1=1084289&r2=1084290&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/DependentCreationalContext.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/DependentCreationalContext.java
Tue Mar 22 18:36:59 2011
@@ -100,14 +100,6 @@ public class DependentCreationalContext<
         return contextual;
     }
 
-    /**
-     * @param contextual the contextual to set
-     */
-    public void setContextual(Contextual<S> contextual)
-    {
-        this.contextual = contextual;
-    }
-    
     private synchronized void writeObject(ObjectOutputStream s)
     throws IOException
     {



Mime
View raw message