You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2010/03/23 12:30:10 UTC

svn commit: r926528 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.java

Author: struberg
Date: Tue Mar 23 11:30:10 2010
New Revision: 926528

URL: http://svn.apache.org/viewvc?rev=926528&view=rev
Log:
OWB-329 make incompleteInstance transient again

The incompleteInstance is only maintained to allow the creation of 
cyclic referenced contextual instances. So we don't need this 
once the contextual instance got created sucessfully.
Since any serialization can only be invoked after the contextual
instance got created, we don't need to serialize the 
imcompleteInstance.

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/creational/CreationalContextImpl.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=926528&r1=926527&r2=926528&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 23 11:30:10 2010
@@ -35,7 +35,7 @@ public class CreationalContextImpl<T> im
     private static final long serialVersionUID = -3416834742959340960L;
 
     /**Actual bean instance*/
-    private Object incompleteInstance = null;
+    private transient Object incompleteInstance = null;
     
     /**Bean proxy*/
     private Object proxyInstance = null;
@@ -319,7 +319,6 @@ public class CreationalContextImpl<T> im
     private synchronized void writeObject(ObjectOutputStream s)
     throws IOException
     {
-        s.writeObject(incompleteInstance);
         s.writeObject(proxyInstance);
 
         // we have to remap into a standard HashMap because WeakHashMap is not serializable
@@ -347,7 +346,6 @@ public class CreationalContextImpl<T> im
     private synchronized void readObject(ObjectInputStream s)
     throws IOException, ClassNotFoundException
     {
-        incompleteInstance = s.readObject();
         proxyInstance = s.readObject();
 
         HashMap<Object, DependentCreationalContext<?>> depo = (HashMap<Object, DependentCreationalContext<?>>)s.readObject();