Skip to content

Commit

Permalink
Revert static ctor change and add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Nov 17, 2024
1 parent b0c04d3 commit e11efe8
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,19 @@ namespace Lucene.Net.Codecs.Lucene40
[TestFixture]
public class TestLucene40PostingsReader : LuceneTestCase
{
internal static readonly string[] terms = new string[100];
// LUCENENET: Avoid static constructors (see https://github.com/apache/lucenenet/pull/224#issuecomment-469284006)
internal static readonly string[] terms = LoadTerms();

static TestLucene40PostingsReader()
static string[] LoadTerms()
{
string[] terms = new string[100];

for (int i = 0; i < terms.Length; i++)
{
terms[i] = Convert.ToString(i + 1);
}

return terms;
}

[OneTimeSetUp]
Expand Down

0 comments on commit e11efe8

Please sign in to comment.