This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 6e44ce69a5d6431d10183cdd5e7932a35eeb5a5b Author: Shad Storhaug <[email protected]> AuthorDate: Tue Jul 9 23:02:46 2019 +0700 Reverted Lucene.Net.Support.EqualityComparer implementation that was created as an experiment to attempt to solve LUCENENET-602 --- .../Analysis/Util/CharArrayMap.cs | 2 +- .../Taxonomy/Directory/DirectoryTaxonomyReader.cs | 3 +- src/Lucene.Net.Tests/Support/TestLurchTable.cs | 18 +-- src/Lucene.Net.Tests/Support/TestTreeSet.cs | 14 +-- src/Lucene.Net/Search/LiveFieldValues.cs | 2 +- src/Lucene.Net/Support/C5.Support.cs | 4 +- .../Support/Compatibility/ConcurrentDictionary.cs | 2 +- src/Lucene.Net/Support/EqualityComparer.cs | 124 --------------------- src/Lucene.Net/Support/HashMap.cs | 6 +- src/Lucene.Net/Support/LinkedHashMap.cs | 2 +- src/Lucene.Net/Support/LurchTable.cs | 16 +-- src/Lucene.Net/Util/Fst/FST.cs | 8 +- src/Lucene.Net/Util/PriorityQueue.cs | 2 +- 13 files changed, 39 insertions(+), 164 deletions(-) diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs index c642bc8..cfe5625 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/CharArrayMap.cs @@ -764,7 +764,7 @@ namespace Lucene.Net.Analysis.Util if (!this.ContainsKey(iter.Current.Key)) return false; - if (!Support.EqualityComparer<TValue>.Default.Equals(this[iter.Current.Key], iter.Current.Value)) + if (!EqualityComparer<TValue>.Default.Equals(this[iter.Current.Key], iter.Current.Value)) return false; } diff --git a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs index 13a5feb..34dc7d0 100644 --- a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs +++ b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyReader.cs @@ -1,5 +1,4 @@ -using Lucene.Net.Support; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Text; diff --git a/src/Lucene.Net.Tests/Support/TestLurchTable.cs b/src/Lucene.Net.Tests/Support/TestLurchTable.cs index af38e5c..47c22a7 100644 --- a/src/Lucene.Net.Tests/Support/TestLurchTable.cs +++ b/src/Lucene.Net.Tests/Support/TestLurchTable.cs @@ -180,7 +180,7 @@ namespace Lucene.Net.Support { //multiple of prime will produce hash collision, thus testing removal of non-first elements const int prime = 1103; - var test = new LurchTable<int, string>(LurchTableOrder.Access, 3, prime, 10, 10, Support.EqualityComparer<int>.Default); + var test = new LurchTable<int, string>(LurchTableOrder.Access, 3, prime, 10, 10, EqualityComparer<int>.Default); test[1 * prime] = "a"; test[2 * prime] = "b"; test[3 * prime] = "c"; @@ -207,7 +207,7 @@ namespace Lucene.Net.Support public void TestCrudEvents() { var recorder = new RecordEvents<int, string>(); - var test = new LurchTable<int, string>(LurchTableOrder.Access, 3, 1103, 10, 10, Support.EqualityComparer<int>.Default); + var test = new LurchTable<int, string>(LurchTableOrder.Access, 3, 1103, 10, 10, EqualityComparer<int>.Default); test.ItemAdded += recorder.ItemAdded; test.ItemUpdated += recorder.ItemUpdated; test.ItemRemoved += recorder.ItemRemoved; @@ -247,7 +247,7 @@ namespace Lucene.Net.Support { //multiple of prime will produce hash collision, thus testing removal of non-first elements const int prime = 1103; - var test = new LurchTable<int, string>(LurchTableOrder.Access, 10, prime, 10, 10, Support.EqualityComparer<int>.Default); + var test = new LurchTable<int, string>(LurchTableOrder.Access, 10, prime, 10, 10, EqualityComparer<int>.Default); test[1 * prime] = "a"; test[2 * prime] = "b"; test[3 * prime] = "c"; @@ -487,8 +487,8 @@ namespace Lucene.Net.Support var keys = new List<int>(); foreach (var kv in sample) keys.Add(kv.Key); - VerifyCollection(Support.EqualityComparer<int>.Default, keys.AsReadOnly(), items.Keys); - VerifyCollection(Support.EqualityComparer<int>.Default, keys.AsReadOnly(), dict.Keys); + VerifyCollection(EqualityComparer<int>.Default, keys.AsReadOnly(), items.Keys); + VerifyCollection(EqualityComparer<int>.Default, keys.AsReadOnly(), dict.Keys); } [Test, LuceneNetSpecific] @@ -500,8 +500,8 @@ namespace Lucene.Net.Support var values = new List<string>(); foreach (var kv in sample) values.Add(kv.Value); - VerifyCollection(Support.EqualityComparer<string>.Default, values.AsReadOnly(), items.Values); - VerifyCollection(Support.EqualityComparer<string>.Default, values.AsReadOnly(), dict.Values); + VerifyCollection(EqualityComparer<string>.Default, values.AsReadOnly(), items.Values); + VerifyCollection(EqualityComparer<string>.Default, values.AsReadOnly(), dict.Values); } [Test] @@ -518,8 +518,8 @@ namespace Lucene.Net.Support class KeyValueEquality<TKey, TValue> : IEqualityComparer<KeyValuePair<TKey, TValue>> { - IEqualityComparer<TKey> KeyComparer = Support.EqualityComparer<TKey>.Default; - IEqualityComparer<TValue> ValueComparer = Support.EqualityComparer<TValue>.Default; + IEqualityComparer<TKey> KeyComparer = EqualityComparer<TKey>.Default; + IEqualityComparer<TValue> ValueComparer = EqualityComparer<TValue>.Default; public bool Equals(KeyValuePair<TKey, TValue> x, KeyValuePair<TKey, TValue> y) { return KeyComparer.Equals(x.Key, y.Key) && ValueComparer.Equals(x.Value, y.Value); diff --git a/src/Lucene.Net.Tests/Support/TestTreeSet.cs b/src/Lucene.Net.Tests/Support/TestTreeSet.cs index 56f88cf..448e27c 100644 --- a/src/Lucene.Net.Tests/Support/TestTreeSet.cs +++ b/src/Lucene.Net.Tests/Support/TestTreeSet.cs @@ -416,7 +416,7 @@ namespace Lucene.Net.Support.RBTreeSet [Test, LuceneNetSpecific] public void NullEqualityComparerinConstructor3() { - Assert.Throws<NullReferenceException>(() => new TreeSet<int>(null, Support.EqualityComparer<int>.Default)); + Assert.Throws<NullReferenceException>(() => new TreeSet<int>(null, EqualityComparer<int>.Default)); } [Test, LuceneNetSpecific] @@ -2784,9 +2784,9 @@ namespace Lucene.Net.Support.RBTreeSet [SetUp] public void Init() { - dit = new TreeSet<int>(SCG.Comparer<int>.Default, Support.EqualityComparer<int>.Default); - dat = new TreeSet<int>(SCG.Comparer<int>.Default, Support.EqualityComparer<int>.Default); - dut = new TreeSet<int>(new RevIC(), Support.EqualityComparer<int>.Default); + dit = new TreeSet<int>(SCG.Comparer<int>.Default, EqualityComparer<int>.Default); + dat = new TreeSet<int>(SCG.Comparer<int>.Default, EqualityComparer<int>.Default); + dut = new TreeSet<int>(new RevIC(), EqualityComparer<int>.Default); } @@ -2880,9 +2880,9 @@ namespace Lucene.Net.Support.RBTreeSet [SetUp] public void Init() { - dit = new TreeSet<int>(SCG.Comparer<int>.Default, Support.EqualityComparer<int>.Default); - dat = new TreeSet<int>(SCG.Comparer<int>.Default, Support.EqualityComparer<int>.Default); - dut = new TreeSet<int>(new RevIC(), Support.EqualityComparer<int>.Default); + dit = new TreeSet<int>(SCG.Comparer<int>.Default, EqualityComparer<int>.Default); + dat = new TreeSet<int>(SCG.Comparer<int>.Default, EqualityComparer<int>.Default); + dut = new TreeSet<int>(new RevIC(), EqualityComparer<int>.Default); } diff --git a/src/Lucene.Net/Search/LiveFieldValues.cs b/src/Lucene.Net/Search/LiveFieldValues.cs index 43603a3..9271a31 100644 --- a/src/Lucene.Net/Search/LiveFieldValues.cs +++ b/src/Lucene.Net/Search/LiveFieldValues.cs @@ -114,7 +114,7 @@ namespace Lucene.Net.Search // First try to get the "live" value: T value; current.TryGetValue(id, out value); - var comparer = Support.EqualityComparer<T>.Default; + var comparer = EqualityComparer<T>.Default; if (comparer.Equals(value, missingValue)) { // Deleted but the deletion is not yet reflected in diff --git a/src/Lucene.Net/Support/C5.Support.cs b/src/Lucene.Net/Support/C5.Support.cs index 9789d88..fc80bbc 100644 --- a/src/Lucene.Net/Support/C5.Support.cs +++ b/src/Lucene.Net/Support/C5.Support.cs @@ -3967,7 +3967,7 @@ namespace Lucene.Net.Support.C5 /// <item><description>If the actual generic argument T implements /// <see cref="T:C5.ICollection`1"/> for some value W of its generic parameter T, /// the equalityComparer will be <see cref="T:C5.UnsequencedCollectionEqualityComparer`2"/></description></item> - /// <item><description>Otherwise the Support.EqualityComparer<T>.Default is returned</description></item> + /// <item><description>Otherwise the SCG.EqualityComparer<T>.Default is returned</description></item> /// </list> /// </summary> /// <value>The comparer</value> @@ -4005,7 +4005,7 @@ namespace Lucene.Net.Support.C5 return CreateAndCache(UnsequencedCollectionEqualityComparer.MakeGenericType(new[] { type, icollection.GetGenericArguments()[0] })); } - return _default = Support.EqualityComparer<T>.Default; + return _default = SCG.EqualityComparer<T>.Default; } } diff --git a/src/Lucene.Net/Support/Compatibility/ConcurrentDictionary.cs b/src/Lucene.Net/Support/Compatibility/ConcurrentDictionary.cs index 22f1531..58f6dd8 100644 --- a/src/Lucene.Net/Support/Compatibility/ConcurrentDictionary.cs +++ b/src/Lucene.Net/Support/Compatibility/ConcurrentDictionary.cs @@ -45,7 +45,7 @@ namespace System.Collections.Concurrent { } public ConcurrentDictionary(int capacity) - : this(capacity, Support.EqualityComparer<TKey>.Default) + : this(capacity, EqualityComparer<TKey>.Default) { } public ConcurrentDictionary(int capacity, IEqualityComparer<TKey> comparer) diff --git a/src/Lucene.Net/Support/EqualityComparer.cs b/src/Lucene.Net/Support/EqualityComparer.cs deleted file mode 100644 index 6ea40cb..0000000 --- a/src/Lucene.Net/Support/EqualityComparer.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System.Collections.Generic; -using System.Reflection; - -namespace Lucene.Net.Support -{ - /* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - /// <summary> - /// <see cref="IEqualityComparer{T}"/> to patch value type support for generics in MONO AOT. - /// Value types for generics in this environment at the time of this writing is - /// not supported, but is currently under development and eventually should be. - /// <para/> - /// This class can be used to patch the behavior when using MONO AOT, at the cost - /// of throwing an exception to reliably detect when generic types are not supported. - /// See <a href=""></a> - /// <para/> - /// See LUCENENET-602. - /// </summary> - /// <typeparam name="T">The type of objects to compare.</typeparam> - public sealed class EqualityComparer<T> - { - private static readonly bool IsValueType = typeof(T).GetTypeInfo().IsValueType; - - /// <summary> - /// Returns a default equality comparer for the type specified by the generic argument. - /// <para/> - /// LUCENENET specific constant that is used for the comparer - /// rather than creating a custom <see cref="IEqualityComparer{T}"/> for value types. - /// See LUCENENET-602. - /// </summary> - public static System.Collections.Generic.EqualityComparer<T> Default { get; } = CreateComparer(); - - private static System.Collections.Generic.EqualityComparer<T> CreateComparer() - { - if (!EqualityComparerConstants.ValueTypesSupported.HasValue) - { - if (EqualityComparerConstants.ValueTypesSupported == true) - { - return System.Collections.Generic.EqualityComparer<T>.Default; - } - else - { - return IsValueType ? - new ValueTypeEqualityComparer() : - System.Collections.Generic.EqualityComparer<T>.Default; - } - } - - // We test for an exception the first time this is called on this runtime instance, - // and store it in the ValueTypesSupported property (called once for any value type). - // This is not currently supported under MONO AOT compilation, but is under development, - // so eventually the catch path will be unreachable. - try - { - var result = System.Collections.Generic.EqualityComparer<T>.Default; - EqualityComparerConstants.ValueTypesSupported = true; - return result; - } - catch when (IsValueType) - { - EqualityComparerConstants.ValueTypesSupported = false; - return new ValueTypeEqualityComparer(); - } - } - - /// <summary> - /// Comparer for any .NET value type. - /// <para/> - /// In some platforms, such as Xamarin iOS, the implementation of <see cref="System.Collections.Generic.EqualityComparer{T}.Default"/> doesn't - /// work for value types. This class is used to provide equality comparers in cases where value types are required. - /// </summary> - internal class ValueTypeEqualityComparer : System.Collections.Generic.EqualityComparer<T> // where T : struct - { - /// <summary> - /// Determines whether two objects of type T are equal. - /// </summary> - /// <param name="x">The first value type to compare.</param> - /// <param name="y">The second value type to compare.</param> - /// <returns><c>true</c> if the specified objects are equal; otherwise, <c>false</c>.</returns> - public override bool Equals(T x, T y) - { - if (x != null) - { - if (y != null) return x.Equals(y); - return false; - } - if (y != null) return false; - return true; - } - - /// <summary> - /// Serves as the default hash function. - /// <para/> - /// This is the same as calling obj.GetHashCode(). - /// </summary> - /// <param name="obj">The object for which to get a hash code.</param> - /// <returns>A hash code for the specified object.</returns> - public override int GetHashCode(T obj) - { - return obj == null ? 0 : obj.GetHashCode(); - } - } - } - - internal class EqualityComparerConstants - { - public static bool? ValueTypesSupported { get; set; } = null; - } -} diff --git a/src/Lucene.Net/Support/HashMap.cs b/src/Lucene.Net/Support/HashMap.cs index 65ba883..f099404 100644 --- a/src/Lucene.Net/Support/HashMap.cs +++ b/src/Lucene.Net/Support/HashMap.cs @@ -95,7 +95,7 @@ namespace Lucene.Net.Support } public HashMap(int initialCapacity) - : this(initialCapacity, Support.EqualityComparer<TKey>.Default) + : this(initialCapacity, EqualityComparer<TKey>.Default) { } @@ -116,7 +116,7 @@ namespace Lucene.Net.Support internal HashMap(IDictionary<TKey, TValue> wrappedDict, IEqualityComparer<TKey> comparer) { // LUCENENET TODO: Is this a bug? Shouldn't we be using the passed in comparer if non-null? - _comparer = /* comparer ?? */ Support.EqualityComparer<TKey>.Default; + _comparer = /* comparer ?? */ EqualityComparer<TKey>.Default; _dict = wrappedDict; _hasNullValue = false; @@ -261,7 +261,7 @@ namespace Lucene.Net.Support { if (!_isValueType && _comparer.Equals(item.Key, default(TKey))) { - return _hasNullValue && Support.EqualityComparer<TValue>.Default.Equals(item.Value, _nullValue); + return _hasNullValue && EqualityComparer<TValue>.Default.Equals(item.Value, _nullValue); } return _dict.Contains(item); diff --git a/src/Lucene.Net/Support/LinkedHashMap.cs b/src/Lucene.Net/Support/LinkedHashMap.cs index dbc5d3b..e3d9c94 100644 --- a/src/Lucene.Net/Support/LinkedHashMap.cs +++ b/src/Lucene.Net/Support/LinkedHashMap.cs @@ -199,7 +199,7 @@ namespace Lucene.Net.Support private bool TryGetNode(TKey key, TValue value, out LinkedListNode<KeyValuePair<TKey, TValue>> node) { LinkedListNode<KeyValuePair<TKey, TValue>> n; - if (dict.TryGetValue(key, out n) && Support.EqualityComparer<TValue>.Default.Equals(value, n.Value.Value)) + if (dict.TryGetValue(key, out n) && EqualityComparer<TValue>.Default.Equals(value, n.Value.Value)) { node = n; return true; diff --git a/src/Lucene.Net/Support/LurchTable.cs b/src/Lucene.Net/Support/LurchTable.cs index 47d251f..13637d6 100644 --- a/src/Lucene.Net/Support/LurchTable.cs +++ b/src/Lucene.Net/Support/LurchTable.cs @@ -91,7 +91,7 @@ namespace Lucene.Net.Support /// <summary>Creates a LurchTable that can store up to <paramref name="capacity"/> items efficiently.</summary> /// <param name="capacity">The initial allowable number of items before allocation of more memory</param> /// <param name="ordering">The type of linking for the items</param> - /// <param name="comparer">The element hash generator for keys, or <c>null</c> to use <see cref="Support.EqualityComparer{TKey}.Default"/></param> + /// <param name="comparer">The element hash generator for keys, or <c>null</c> to use <see cref="EqualityComparer{TKey}.Default"/></param> public LurchTable(int capacity, LurchTableOrder ordering, IEqualityComparer<TKey> comparer) : this(ordering, int.MaxValue, capacity >> 1, capacity >> 4, capacity >> 8, comparer) { } @@ -104,7 +104,7 @@ namespace Lucene.Net.Support /// <summary>Creates a LurchTable that orders items by <paramref name="ordering"/> and removes items once the specified <paramref name="limit"/> is reached.</summary> /// <param name="ordering">The type of linking for the items</param> /// <param name="limit">The maximum allowable number of items, or int.MaxValue for unlimited</param> - /// <param name="comparer">The element hash generator for keys, or <c>null</c> to use <see cref="Support.EqualityComparer{TKey}.Default"/></param> + /// <param name="comparer">The element hash generator for keys, or <c>null</c> to use <see cref="EqualityComparer{TKey}.Default"/></param> public LurchTable(LurchTableOrder ordering, int limit, IEqualityComparer<TKey> comparer) : this(ordering, limit, limit >> 1, limit >> 4, limit >> 8, comparer) { } @@ -116,7 +116,7 @@ namespace Lucene.Net.Support /// <param name="hashSize">The number of hash buckets to use for the collection, usually 1/2 estimated capacity</param> /// <param name="allocSize">The number of entries to allocate at a time, usually 1/16 estimated capacity</param> /// <param name="lockSize">The number of concurrency locks to preallocate, usually 1/256 estimated capacity</param> - /// <param name="comparer">The element hash generator for keys, or <c>null</c> to use <see cref="Support.EqualityComparer{TKey}.Default"/></param> + /// <param name="comparer">The element hash generator for keys, or <c>null</c> to use <see cref="EqualityComparer{TKey}.Default"/></param> public LurchTable(LurchTableOrder ordering, int limit, int hashSize, int allocSize, int lockSize, IEqualityComparer<TKey> comparer) { if (limit <= 0) @@ -125,7 +125,7 @@ namespace Lucene.Net.Support throw new ArgumentOutOfRangeException("ordering"); _limit = limit <= 0 ? int.MaxValue : limit; - _comparer = comparer ?? Support.EqualityComparer<TKey>.Default; + _comparer = comparer ?? EqualityComparer<TKey>.Default; _ordering = ordering; allocSize = (int)Math.Min((long)allocSize + OverAlloc, 0x3fffffff); @@ -470,7 +470,7 @@ namespace Lucene.Net.Support { TValue test; if (TryGetValue(item.Key, out test)) - return Support.EqualityComparer<TValue>.Default.Equals(item.Value, test); + return EqualityComparer<TValue>.Default.Equals(item.Value, test); return false; } @@ -767,7 +767,7 @@ namespace Lucene.Net.Support /// </summary> public bool Contains(TValue value) { - var comparer = Support.EqualityComparer<TValue>.Default; + var comparer = EqualityComparer<TValue>.Default; foreach (var item in _owner) { if (comparer.Equals(item.Value, value)) @@ -1426,7 +1426,7 @@ namespace Lucene.Net.Support { Value = value; - if (_hasTestValue && !Support.EqualityComparer<TValue>.Default.Equals(_testValue, value)) + if (_hasTestValue && !EqualityComparer<TValue>.Default.Equals(_testValue, value)) return false; if (Condition != null && !Condition(key, value)) return false; @@ -1521,7 +1521,7 @@ namespace Lucene.Net.Support } public bool UpdateValue(TKey key, ref TValue value) { - if (_hasTestValue && !Support.EqualityComparer<TValue>.Default.Equals(_testValue, value)) + if (_hasTestValue && !EqualityComparer<TValue>.Default.Equals(_testValue, value)) return false; value = Value; diff --git a/src/Lucene.Net/Util/Fst/FST.cs b/src/Lucene.Net/Util/Fst/FST.cs index c4053fd..8982395 100644 --- a/src/Lucene.Net/Util/Fst/FST.cs +++ b/src/Lucene.Net/Util/Fst/FST.cs @@ -362,7 +362,7 @@ namespace Lucene.Net.Util.Fst { throw new InvalidOperationException("already finished"); } - if (newStartNode == FST.FINAL_END_NODE && !Support.EqualityComparer<T>.Default.Equals(emptyOutput, default(T))) + if (newStartNode == FST.FINAL_END_NODE && !EqualityComparer<T>.Default.Equals(emptyOutput, default(T))) { newStartNode = 0; } @@ -514,7 +514,7 @@ namespace Lucene.Net.Util.Fst } // TODO: really we should encode this as an arc, arriving // to the root node, instead of special casing here: - if (!Support.EqualityComparer<T>.Default.Equals(emptyOutput, default(T))) + if (!EqualityComparer<T>.Default.Equals(emptyOutput, default(T))) { // Accepts empty string @out.WriteByte(1); @@ -875,7 +875,7 @@ namespace Lucene.Net.Util.Fst /// </summary> public FST.Arc<T> GetFirstArc(FST.Arc<T> arc) { - if (!Support.EqualityComparer<T>.Default.Equals(emptyOutput, default(T))) + if (!EqualityComparer<T>.Default.Equals(emptyOutput, default(T))) { arc.Flags = FST.BIT_FINAL_ARC | FST.BIT_LAST_ARC; arc.NextFinalOutput = emptyOutput; @@ -2053,7 +2053,7 @@ namespace Lucene.Net.Util.Fst fst.startNode = newNodeAddress.Get((int)startNode); //System.out.println("new startNode=" + fst.startNode + " old startNode=" + startNode); - if (!Support.EqualityComparer<T>.Default.Equals(emptyOutput, default(T))) + if (!EqualityComparer<T>.Default.Equals(emptyOutput, default(T))) { fst.EmptyOutput = emptyOutput; } diff --git a/src/Lucene.Net/Util/PriorityQueue.cs b/src/Lucene.Net/Util/PriorityQueue.cs index 391dd4f..36d5be5 100644 --- a/src/Lucene.Net/Util/PriorityQueue.cs +++ b/src/Lucene.Net/Util/PriorityQueue.cs @@ -88,7 +88,7 @@ namespace Lucene.Net.Util { // If sentinel objects are supported, populate the queue with them T sentinel = GetSentinelObject(); - if (!Support.EqualityComparer<T>.Default.Equals(sentinel, default(T))) + if (!EqualityComparer<T>.Default.Equals(sentinel, default(T))) { heap[1] = sentinel; for (int i = 2; i < heap.Length; i++)
