Lucene.Net.Diagnostics.Debugging: Use J2N StringFormatter to automatically format arrays and IStructuralFormattable collections
diff --git a/src/Lucene.Net/Support/Diagnostics/Debugging.cs b/src/Lucene.Net/Support/Diagnostics/Debugging.cs
index 428fe62..33b70e2 100644
--- a/src/Lucene.Net/Support/Diagnostics/Debugging.cs
+++ b/src/Lucene.Net/Support/Diagnostics/Debugging.cs
@@ -1,5 +1,5 @@
+using J2N.Text;
 using Lucene.Net.Util;
-using System;
 using System.Runtime.CompilerServices;
 
 namespace Lucene.Net.Diagnostics
@@ -56,7 +56,8 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static void Assert<T0>(bool condition, string messageToFormat, T0 p0)
         {
-            if (AssertsEnabled && !condition) throw new AssertionException(string.Format(messageToFormat, p0));
+            if (AssertsEnabled && !condition)
+                throw new AssertionException(string.Format(StringFormatter.InvariantCulture, messageToFormat, p0));
         }
 
         /// <summary>
@@ -68,7 +69,8 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static void Assert<T0, T1>(bool condition, string messageToFormat, T0 p0, T1 p1)
         {
-            if (AssertsEnabled && !condition) throw new AssertionException(string.Format(messageToFormat, p0, p1));
+            if (AssertsEnabled && !condition)
+                throw new AssertionException(string.Format(StringFormatter.InvariantCulture, messageToFormat, p0, p1));
         }
 
         /// <summary>
@@ -80,7 +82,8 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static void Assert<T0, T1, T2>(bool condition, string messageToFormat, T0 p0, T1 p1, T2 p2)
         {
-            if (AssertsEnabled && !condition) throw new AssertionException(string.Format(messageToFormat, p0, p1, p2));
+            if (AssertsEnabled && !condition)
+                throw new AssertionException(string.Format(StringFormatter.InvariantCulture, messageToFormat, p0, p1, p2));
         }
 
         /// <summary>
@@ -92,7 +95,8 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static void Assert<T0, T1, T2, T3>(bool condition, string messageToFormat, T0 p0, T1 p1, T2 p2, T3 p3)
         {
-            if (AssertsEnabled && !condition) throw new AssertionException(string.Format(messageToFormat, p0, p1, p2, p3));
+            if (AssertsEnabled && !condition)
+                throw new AssertionException(string.Format(StringFormatter.InvariantCulture, messageToFormat, p0, p1, p2, p3));
         }
 
         /// <summary>
@@ -104,7 +108,8 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static void Assert<T0, T1, T2, T3, T4>(bool condition, string messageToFormat, T0 p0, T1 p1, T2 p2, T3 p3, T4 p4)
         {
-            if (AssertsEnabled && !condition) throw new AssertionException(string.Format(messageToFormat, p0, p1, p2, p3, p4));
+            if (AssertsEnabled && !condition)
+                throw new AssertionException(string.Format(StringFormatter.InvariantCulture, messageToFormat, p0, p1, p2, p3, p4));
         }
 
         /// <summary>
@@ -116,7 +121,8 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static void Assert<T0, T1, T2, T3, T4, T5>(bool condition, string messageToFormat, T0 p0, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5)
         {
-            if (AssertsEnabled && !condition) throw new AssertionException(string.Format(messageToFormat, p0, p1, p2, p3, p4, p5));
+            if (AssertsEnabled && !condition)
+                throw new AssertionException(string.Format(StringFormatter.InvariantCulture, messageToFormat, p0, p1, p2, p3, p4, p5));
         }
 
         /// <summary>
@@ -128,7 +134,8 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static void Assert<T0, T1, T2, T3, T4, T5, T6>(bool condition, string messageToFormat, T0 p0, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6)
         {
-            if (AssertsEnabled && !condition) throw new AssertionException(string.Format(messageToFormat, p0, p1, p2, p3, p4, p5, p6));
+            if (AssertsEnabled && !condition)
+                throw new AssertionException(string.Format(StringFormatter.InvariantCulture, messageToFormat, p0, p1, p2, p3, p4, p5, p6));
         }
 
         /// <summary>
@@ -140,13 +147,15 @@
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
         public static void Assert<T0, T1, T2, T3, T4, T5, T6, T7>(bool condition, string messageToFormat, T0 p0, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7)
         {
-            if (AssertsEnabled && !condition) throw new AssertionException(string.Format(messageToFormat, p0, p1, p2, p3, p4, p5, p6, p7));
+            if (AssertsEnabled && !condition)
+                throw new AssertionException(string.Format(StringFormatter.InvariantCulture, messageToFormat, p0, p1, p2, p3, p4, p5, p6, p7));
         }
 
         /// <summary>
         /// Checks for a condition; if the <paramref name="condition"/> is <c>false</c>, throws an <see cref="AssertionException"/> with the given message.
         /// <para/>
-        /// IMPORTANT: If you need to use string concatenation when building the message, use <see cref="Assert(bool, Func{string})"/> for better performance.
+        /// IMPORTANT: If you need to use string concatenation when building the message, use an overload of
+        /// <see cref="Assert{T0}(bool, string, T0)"/> for better performance.
         /// </summary>
         /// <param name="condition">The conditional expression to evaluate. If the condition is <c>true</c>, no exception is thrown.</param>
         /// <param name="message">The message to use.</param>