lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject svn commit: r1372954 - in /incubator/lucene.net/trunk/src/core: Lucene.Net.csproj Support/WeakDictionary.cs Support/WeakReference.cs
Date Tue, 14 Aug 2012 16:06:25 GMT
Author: ccurrens
Date: Tue Aug 14 16:06:25 2012
New Revision: 1372954

URL: http://svn.apache.org/viewvc?rev=1372954&view=rev
Log:
[LUCENENET-500] - Fixed medium trust issue.  Removed WeakReference wrapper.

Removed:
    incubator/lucene.net/trunk/src/core/Support/WeakReference.cs
Modified:
    incubator/lucene.net/trunk/src/core/Lucene.Net.csproj
    incubator/lucene.net/trunk/src/core/Support/WeakDictionary.cs

Modified: incubator/lucene.net/trunk/src/core/Lucene.Net.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Lucene.Net.csproj?rev=1372954&r1=1372953&r2=1372954&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Lucene.Net.csproj (original)
+++ incubator/lucene.net/trunk/src/core/Lucene.Net.csproj Tue Aug 14 16:06:25 2012
@@ -900,7 +900,6 @@
     <Compile Include="Support\ThreadClass.cs" />
     <Compile Include="Support\ThreadLock.cs" />
     <Compile Include="Support\WeakDictionary.cs" />
-    <Compile Include="Support\WeakReference.cs" />
     <Compile Include="Util\ArrayUtil.cs" />
     <Compile Include="Util\IAttribute.cs" />
     <Compile Include="Util\Attribute.cs" />

Modified: incubator/lucene.net/trunk/src/core/Support/WeakDictionary.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Support/WeakDictionary.cs?rev=1372954&r1=1372953&r2=1372954&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Support/WeakDictionary.cs (original)
+++ incubator/lucene.net/trunk/src/core/Support/WeakDictionary.cs Tue Aug 14 16:06:25 2012
@@ -245,7 +245,7 @@ namespace Lucene.Net.Support
         /// </summary>
         class WeakKey<T>
         {
-            WeakReference<T> reference;
+            WeakReference reference;
             int hashCode;
 
             public WeakKey(T key)
@@ -254,7 +254,7 @@ namespace Lucene.Net.Support
                     throw new ArgumentNullException("key");
 
                 hashCode = key.GetHashCode();
-                reference = new WeakReference<T>(key);
+                reference = new WeakReference(key);
             }
 
             public override int GetHashCode()
@@ -284,7 +284,7 @@ namespace Lucene.Net.Support
 
             public T Target
             {
-                get { return reference.Target; }
+                get { return (T)reference.Target; }
             }
 
             public bool IsAlive



Mime
View raw message