diff --git a/src/Lucene.Net/Support/ConcurrentHashSet.cs b/src/Lucene.Net/Support/ConcurrentHashSet.cs index 9362309ed1..dd4b34bf4a 100644 --- a/src/Lucene.Net/Support/ConcurrentHashSet.cs +++ b/src/Lucene.Net/Support/ConcurrentHashSet.cs @@ -31,6 +31,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE using System.Diagnostics; using System.Runtime.CompilerServices; using System.Threading; +using JCG = J2N.Collections.Generic; #nullable enable namespace Lucene.Net.Support @@ -44,7 +45,8 @@ namespace Lucene.Net.Support /// concurrently from multiple threads. /// [DebuggerDisplay("Count = {Count}")] - internal class ConcurrentHashSet : ISet, IReadOnlyCollection + // ReSharper disable once RedundantExtendsListEntry + internal class ConcurrentHashSet : ISet, IReadOnlyCollection, ICollection { private const int DefaultCapacity = 31; private const int MaxLockNumber = 1024; @@ -291,7 +293,7 @@ private ConcurrentHashSet(int concurrencyLevel, int capacity, bool growLockArray _growLockArray = growLockArray; _budget = buckets.Length / locks.Length; - _comparer = comparer ?? EqualityComparer.Default; + _comparer = comparer ?? JCG.EqualityComparer.Default; } ///