lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r753215 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs
Date Fri, 13 Mar 2009 12:13:49 GMT
Author: digy
Date: Fri Mar 13 12:13:49 2009
New Revision: 753215

URL: http://svn.apache.org/viewvc?rev=753215&view=rev
Log:
LUCENENET-174 RAMDirectory Not Correctly Serializing

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Store/RAMDirectory.cs?rev=753215&r1=753214&r2=753215&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs Fri Mar 13 12:13:49
2009
@@ -47,6 +47,16 @@
             set { sizeInBytes = value; }
         }
 
+        //https://issues.apache.org/jira/browse/LUCENENET-174
+        [System.Runtime.Serialization.OnDeserialized]
+        void OnDeserialized(System.Runtime.Serialization.StreamingContext context)
+        {
+            if (lockFactory == null)
+            {
+                SetLockFactory(new SingleInstanceLockFactory());
+            }
+        }
+
 		// *****
 		// Lock acquisition sequence:  RAMDirectory, then RAMFile
 		// *****



Mime
View raw message