You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by cc...@apache.org on 2012/08/14 18:20:12 UTC
svn commit: r1372960 - in /incubator/lucene.net/branches/3.0.3/src/core:
Lucene.Net.csproj Support/WeakDictionary.cs Support/WeakReference.cs
Author: ccurrens
Date: Tue Aug 14 16:20:12 2012
New Revision: 1372960
URL: http://svn.apache.org/viewvc?rev=1372960&view=rev
Log:
[LUCENENET-500] - Fixed medium trust issue. Removed WeakReference wrapper.
Removed:
incubator/lucene.net/branches/3.0.3/src/core/Support/WeakReference.cs
Modified:
incubator/lucene.net/branches/3.0.3/src/core/Lucene.Net.csproj
incubator/lucene.net/branches/3.0.3/src/core/Support/WeakDictionary.cs
Modified: incubator/lucene.net/branches/3.0.3/src/core/Lucene.Net.csproj
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/3.0.3/src/core/Lucene.Net.csproj?rev=1372960&r1=1372959&r2=1372960&view=diff
==============================================================================
--- incubator/lucene.net/branches/3.0.3/src/core/Lucene.Net.csproj (original)
+++ incubator/lucene.net/branches/3.0.3/src/core/Lucene.Net.csproj Tue Aug 14 16:20:12 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/branches/3.0.3/src/core/Support/WeakDictionary.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/3.0.3/src/core/Support/WeakDictionary.cs?rev=1372960&r1=1372959&r2=1372960&view=diff
==============================================================================
--- incubator/lucene.net/branches/3.0.3/src/core/Support/WeakDictionary.cs (original)
+++ incubator/lucene.net/branches/3.0.3/src/core/Support/WeakDictionary.cs Tue Aug 14 16:20:12 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