paulirwin commented on code in PR #1124:
URL: https://github.com/apache/lucenenet/pull/1124#discussion_r2354229675


##########
src/Lucene.Net/Support/Collections.cs:
##########
@@ -227,22 +195,22 @@ public static ReadOnlyDictionary<TKey, TValue> 
AsReadOnly<TKey, TValue>(IDiction
 
         #region ReverseComparer
 
-        private class ReverseComparer<T> : IComparer<T>
+        private class ReverseComparer<T> : IComparer<T?>
         {
             internal static readonly ReverseComparer<T> REVERSE_ORDER = new 
ReverseComparer<T>();
 
-            public int Compare(T x, T y)
+            public int Compare(T? x, T? y)
             {
                 // LUCENENET specific: Use J2N's Comparer<T> to mimic Java 
comparison behavior
-                return JCG.Comparer<T>.Default.Compare(y, x);
+                return JCG.Comparer<T?>.Default.Compare(y, x);

Review Comment:
   Changed per other comment to suppress nullability warnings on .NET 
Framework/Standard instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to