You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/01/31 17:55:50 UTC

[17/50] [abbrv] lucenenet git commit: Lucene.Net.Core.Support.Compatibility.Collections: Changed Singleton to use the HashSet initializer rather than using ImmutableHashSet

Lucene.Net.Core.Support.Compatibility.Collections: Changed Singleton<T> to use the HashSet initializer rather than using ImmutableHashSet


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/7d324779
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/7d324779
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/7d324779

Branch: refs/heads/api-work
Commit: 7d324779f59a588c686e52d36957d03e11c20e17
Parents: e37f919
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Tue Jan 31 13:12:12 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Jan 31 13:12:12 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Support/Compatibility/Collections.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7d324779/src/Lucene.Net.Core/Support/Compatibility/Collections.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/Compatibility/Collections.cs b/src/Lucene.Net.Core/Support/Compatibility/Collections.cs
index 90fe920..729d526 100644
--- a/src/Lucene.Net.Core/Support/Compatibility/Collections.cs
+++ b/src/Lucene.Net.Core/Support/Compatibility/Collections.cs
@@ -72,7 +72,7 @@ namespace Lucene.Net
 
         public static ISet<T> Singleton<T>(T o)
         {
-            return ImmutableHashSet.Create(o); // LUCENENET TODO: Immutable != Singleton
+            return new HashSet<T>(new T[] { o });
         }
 
         public static IDictionary<TKey, TValue> SingletonMap<TKey, TValue>(TKey key, TValue value)
@@ -321,7 +321,7 @@ namespace Lucene.Net
         // CaseInsensitiveComparer works correctly in .NET (not sure why).
         // So, this hybrid was made from the original Java implementation and the
         // original implemenation (above) that used CaseInsensitiveComparer.
-        public class ReverseComparer<T> : IComparer<T>
+        private class ReverseComparer<T> : IComparer<T>
         {
             internal static readonly ReverseComparer<T> REVERSE_ORDER = new ReverseComparer<T>();