commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcar...@apache.org
Subject svn commit: r757494 - /commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java
Date Mon, 23 Mar 2009 18:40:45 GMT
Author: jcarman
Date: Mon Mar 23 18:40:45 2009
New Revision: 757494

URL: http://svn.apache.org/viewvc?rev=757494&view=rev
Log:
PROXY-8: Improve Proxy Serialization

Modified:
    commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java

Modified: commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java?rev=757494&r1=757493&r2=757494&view=diff
==============================================================================
--- commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java
(original)
+++ commons/proper/proxy/trunk/src/main/java/org/apache/commons/proxy/provider/SingletonProvider.java
Mon Mar 23 18:40:45 2009
@@ -19,6 +19,8 @@
 
 import org.apache.commons.proxy.ObjectProvider;
 
+import java.io.Serializable;
+
 /**
  * Wraps another object provider, making sure to only call it once, returning the value returned
from the wrapped
  * provider on all subsequent invocations.
@@ -26,13 +28,13 @@
  * @author James Carman
  * @since 1.0
  */
-public class SingletonProvider extends ProviderDecorator
+public class SingletonProvider extends ProviderDecorator implements Serializable
 {
 //**********************************************************************************************************************
 // Fields
 //**********************************************************************************************************************
 
-    private Object instance;
+    private transient Object instance;
 
 //**********************************************************************************************************************
 // Constructors
@@ -54,7 +56,6 @@
             if( instance == null )
             {
                 instance = super.getObject();
-                inner = null; // Garbage collection
             }
         }
         return instance;



Mime
View raw message