You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by pa...@apache.org on 2026/06/22 22:21:26 UTC
(lucenenet) branch master updated: Bumped J2N to 2.2.0-alpha-0048 (#1378)
This is an automated email from the ASF dual-hosted git repository.
paulirwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
The following commit(s) were added to refs/heads/master by this push:
new ff37677aa Bumped J2N to 2.2.0-alpha-0048 (#1378)
ff37677aa is described below
commit ff37677aa6b579bcc799d1dfc8198b722b5de933
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Tue Jun 23 05:21:20 2026 +0700
Bumped J2N to 2.2.0-alpha-0048 (#1378)
---
.build/dependencies.props | 2 +-
src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs | 2 +-
src/Lucene.Net/Support/Collections.cs | 16 +---------------
3 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/.build/dependencies.props b/.build/dependencies.props
index 48e091e14..74728c75e 100644
--- a/.build/dependencies.props
+++ b/.build/dependencies.props
@@ -38,7 +38,7 @@
<IKVMPackageVersion>8.7.5</IKVMPackageVersion>
<IKVMMavenSdkPackageVersion>1.6.7</IKVMMavenSdkPackageVersion>
<!-- J2N will break binary compatibility in 3.0.0 to fix the APIs of collection types -->
- <J2NPackageVersion>[2.2.0-alpha-0042, 3.0.0)</J2NPackageVersion>
+ <J2NPackageVersion>[2.2.0-alpha-0048, 3.0.0)</J2NPackageVersion>
<LiquidTestReportsMarkdownPackageVersion>1.0.9</LiquidTestReportsMarkdownPackageVersion>
<LuceneNetCodeAnalysisDevPackageVersion>1.0.0-alpha.36</LuceneNetCodeAnalysisDevPackageVersion>
<MicrosoftAspNetCoreHttpAbstractionsPackageVersion>2.3.0</MicrosoftAspNetCoreHttpAbstractionsPackageVersion>
diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index 1a3f20378..0c3f02b1d 100644
--- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -1321,7 +1321,7 @@ public static ISet<object> AsSet(params object[] args)
{
while (iter.MoveNext())
{
- stream.WriteLine(Collections.ToString(iter.Current));
+ stream.WriteLine(string.Format(J2N.Text.StringFormatter.InvariantCulture, "{0}", iter.Current));
}
}
stream.WriteLine("*** END " + label + " ***");
diff --git a/src/Lucene.Net/Support/Collections.cs b/src/Lucene.Net/Support/Collections.cs
index b806012a0..8dfc6936a 100644
--- a/src/Lucene.Net/Support/Collections.cs
+++ b/src/Lucene.Net/Support/Collections.cs
@@ -163,21 +163,7 @@ public static string ToString<T>(ICollection<T>? collection)
/// </summary>
public static string? ToString(object? obj)
{
- if (obj is null)
- {
- return "null";
- }
-
- Type t = obj.GetType();
- if (t.IsGenericType
- && (t.ImplementsGenericInterface(typeof(ICollection<>)))
- || t.ImplementsGenericInterface(typeof(IDictionary<,>)))
- {
- dynamic genericType = Convert.ChangeType(obj, t);
- return ToString(genericType);
- }
-
- return Convert.ToString(obj, CultureInfo.InvariantCulture);
+ return string.Format(J2N.Text.StringFormatter.InvariantCulture, "{0}", obj);
}
public static ReadOnlyList<T> AsReadOnly<T>(IList<T> list)