Skip to content

Commit

Permalink
Issue #916 - Rectified Pull Request Issues
Browse files Browse the repository at this point in the history
Rectified Pull request issues as identified by NightOwl888:
 - Removed to missed references to `FEATURE_ARRAYEMPTY'
 - Reverted `FieldComparator.cs` back to original state
 - Corrected sort order for using statements
 - Reverted indentation on `JavascriptLexer.cs`
  • Loading branch information
J-Exodus committed Aug 13, 2024
1 parent 53a115e commit 08f695d
Show file tree
Hide file tree
Showing 7 changed files with 629 additions and 633 deletions.
8 changes: 0 additions & 8 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<PropertyGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcoreapp')) Or $(TargetFramework.StartsWith('net5.')) Or $(TargetFramework.StartsWith('net6.')) Or $(TargetFramework.StartsWith('net7.')) Or $(TargetFramework.StartsWith('net8.')) ">

<DefineConstants>$(DefineConstants);NETSTANDARD</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_ARRAYEMPTY</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_CULTUREINFO_CURRENTCULTURE_SETTER</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_ENCODINGPROVIDERS</DefineConstants>

Expand Down Expand Up @@ -113,13 +112,6 @@

</PropertyGroup>

<!-- Features in .NET Framework 4.6+ only -->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net46')) Or $(TargetFramework.StartsWith('net47')) Or $(TargetFramework.StartsWith('net48'))">

<DefineConstants>$(DefineConstants);FEATURE_ARRAYEMPTY</DefineConstants>

</PropertyGroup>

<!-- Features in .NET Framework 4.5+ -->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
using Lucene.Net.Analysis.Util;
using Lucene.Net.Index;
using Lucene.Net.Util;
using System;
using System.Collections.Generic;
using System.IO;
using System;
using JCG = J2N.Collections.Generic;

namespace Lucene.Net.Analysis.Query
Expand Down
1,237 changes: 619 additions & 618 deletions src/Lucene.Net.Expressions/JS/JavascriptLexer.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Lucene.Net.Store;
using Lucene.Net.Support.IO;
using Lucene.Net.Util;
using System;
using System.Collections.Generic;
using System.IO;
using System;
using JCG = J2N.Collections.Generic;

namespace Lucene.Net.Search.Suggest
Expand Down
8 changes: 6 additions & 2 deletions src/Lucene.Net/Search/FieldComparator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1455,10 +1455,14 @@ public override int CompareValues(BytesRef val1, BytesRef val2)
// TODO: should we remove this? who really uses it?
public sealed class TermValComparer : FieldComparer<BytesRef>
{
// LUCENENET NOTE: We can't use Arrays.Empty<byte>() here because
// MISSING_BYTES and NON_MISSING_BYTES are compared for reference
// equality and Arrays.Empty<byte>() returns a singleton instance.

// sentinels, just used internally in this comparer
private static readonly byte[] MISSING_BYTES = Array.Empty<byte>();
private static readonly byte[] MISSING_BYTES = new byte[0];

private static readonly byte[] NON_MISSING_BYTES = Array.Empty<byte>();
private static readonly byte[] NON_MISSING_BYTES = new byte[0];

private readonly BytesRef[] values; // LUCENENET: marked readonly
private BinaryDocValues docTerms;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Lucene.Net.Attributes;
using Lucene.Net.Cli.CommandLine;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System;

namespace Lucene.Net.Cli.Commands
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Lucene.Net.Attributes;
using Lucene.Net.Support;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System;

namespace Lucene.Net.Cli.Commands
{
Expand Down

0 comments on commit 08f695d

Please sign in to comment.