lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r937025 - /lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
Date Thu, 22 Apr 2010 19:16:06 GMT
Author: digy
Date: Thu Apr 22 19:16:06 2010
New Revision: 937025

URL: http://svn.apache.org/viewvc?rev=937025&view=rev
Log:
LUCENENET-357 Mostly won't work on shared hosts / Mosso cloud etc due to 'Trust' levels

Modified:
    lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs

Modified: lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs
URL: http://svn.apache.org/viewvc/lucene/lucene.net/trunk/C%23/src/Lucene.Net/SupportClass.cs?rev=937025&r1=937024&r2=937025&view=diff
==============================================================================
--- lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs (original)
+++ lucene/lucene.net/trunk/C#/src/Lucene.Net/SupportClass.cs Thu Apr 22 19:16:06 2010
@@ -1165,23 +1165,34 @@ public class SupportClass
         /// is added to the hashtable, the key is wrapped using a WeakKey. WeakKey saves
the
         /// value of the original object hashcode for fast comparison.
         /// </summary>
-        class WeakKey : WeakReference
+        class WeakKey 
         {
+            WeakReference reference;
             int hashCode;
 
             public WeakKey(object key)
-                : base(key)
             {
                 if (key == null)
                     throw new ArgumentNullException("key");
 
                 hashCode = key.GetHashCode();
+                reference = new WeakReference(key);
             }
 
             public override int GetHashCode()
             {
                 return hashCode;
             }
+
+            public object Target
+            {
+                get { return reference.Target; }
+            }
+
+            public bool IsAlive
+            {
+                get { return reference.IsAlive; }
+            }
         }
 
         /// <summary>



Mime
View raw message