lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r881413 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/RAMDirectory.cs
Date Tue, 17 Nov 2009 17:57:00 GMT
Author: digy
Date: Tue Nov 17 17:56:59 2009
New Revision: 881413

URL: http://svn.apache.org/viewvc?rev=881413&view=rev
Log:
In v2.9.x,
Missing patch for LUCENENET-174 (RAMDirectory Not Correctly Serilizing)  applied.

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=881413&r1=881412&r2=881413&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 Tue Nov 17 17:56:59
2009
@@ -99,7 +99,17 @@
 		public RAMDirectory(System.String dir):this(FSDirectory.GetDirectory(dir), true)
 		{
 		}
-		
+
+         //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());
+            }
+        }
+
 		public override System.String[] List()
 		{
 			lock (this)



Mime
View raw message