Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Jan 21, 2025
1 parent 44dd6dc commit 73a1ab3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 35 deletions.
2 changes: 0 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
<!-- Features in .NET Core 3.x, .NET 5.x, .NET 6.x, .NET 7.x, .NET 8.x, and .NET 9.x only -->
<PropertyGroup Condition=" $(TargetFramework.StartsWith('netcoreapp3.')) Or $(TargetFramework.StartsWith('net5.')) Or $(TargetFramework.StartsWith('net6.')) Or $(TargetFramework.StartsWith('net7.')) Or $(TargetFramework.StartsWith('net8.')) Or $(TargetFramework.StartsWith('net9.')) ">

<DefineConstants>$(DefineConstants);FEATURE_ARGITERATOR</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_PROCESS_KILL_ENTIREPROCESSTREE</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_STRING_CONCAT_READONLYSPAN</DefineConstants>

Expand Down Expand Up @@ -144,7 +143,6 @@
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">

<DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants>
<DefineConstants>$(DefineConstants);FEATURE_ARGITERATOR</DefineConstants>
<!-- Although code access security is available in .NET Standard 2.0+ via platform extensions, we are excluding
it due to the fact it is not a primary feature of Lucene.NET and it is supported in .NET Framework -->
<DefineConstants>$(DefineConstants);FEATURE_CODE_ACCESS_SECURITY</DefineConstants>
Expand Down
16 changes: 4 additions & 12 deletions src/Lucene.Net.QueryParser/Classic/QueryParserTokenManager.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Lucene.Net.Support.IO;
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;

namespace Lucene.Net.QueryParsers.Classic
{
Expand All @@ -28,15 +26,9 @@ namespace Lucene.Net.QueryParsers.Classic
[SuppressMessage("CodeQuality", "IDE0051:Remove unused private members", Justification = "This class is based on generated code")]
public class QueryParserTokenManager //: QueryParserConstants
{
/// <summary>Debug output. </summary>
#pragma warning disable IDE0052 // Remove unread private members
private TextWriter debugStream = TextWriter.Null; // LUCENENET specific - made private, since we already have a setter
#pragma warning restore IDE0052 // Remove unread private members
/// <summary>Set debug output. </summary>
public virtual void SetDebugStream(TextWriter ds)
{
debugStream = new SafeTextWriterWrapper(ds);
}
/** Debug output. */
// LUCENENET: debugStream/SetDebugStream() omitted, since it is unused and has been omitted in later versions of Lucene

private int JjStopStringLiteralDfa_2(int pos, long active0)
{
switch (pos)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Lucene.Net.Support.IO;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.CodeAnalysis;
using System;
using System.IO;

namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
{
Expand Down Expand Up @@ -29,12 +27,9 @@ namespace Lucene.Net.QueryParsers.Flexible.Standard.Parser
[SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value", Justification = "This class is based on generated code")]
public class StandardSyntaxParserTokenManager /*: StandardSyntaxParserConstants*/
{
/// <summary>Debug output.</summary>
#pragma warning disable IDE0052 // Remove unread private members
private TextWriter debugStream = TextWriter.Null; // LUCENENET specific - made private, since we already have a setter
#pragma warning restore IDE0052 // Remove unread private members
/// <summary>Set debug output.</summary>
public void SetDebugStream(TextWriter ds) { debugStream = new SafeTextWriterWrapper(ds); }
/** Debug output. */
// LUCENENET: debugStream/SetDebugStream() omitted, since it is unused and has been omitted in later versions of Lucene

private int JjStopStringLiteralDfa_2(int pos, long active0)
{
switch (pos)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Lucene.Net.Support.IO;
using System;
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;

namespace Lucene.Net.QueryParsers.Surround.Parser
{
Expand Down Expand Up @@ -31,15 +29,9 @@ namespace Lucene.Net.QueryParsers.Surround.Parser
[SuppressMessage("Style", "IDE1006:Naming Styles", Justification = "This class is based on generated code")]
public class QueryParserTokenManager //: QueryParserConstants
{
/// <summary>Debug output. </summary>
#pragma warning disable IDE0052 // Remove unread private members
private TextWriter debugStream = TextWriter.Null; // LUCENENET specific - made private, since we already have a setter
#pragma warning restore IDE0052 // Remove unread private members
/// <summary>Set debug output. </summary>
public virtual void SetDebugStream(TextWriter ds)
{
debugStream = new SafeTextWriterWrapper(ds);
}
/** Debug output. */
// LUCENENET: debugStream/SetDebugStream() omitted, since it is unused and has been omitted in later versions of Lucene

private int JjStopStringLiteralDfa_1(int pos, long active0)
{
switch (pos)
Expand Down

0 comments on commit 73a1ab3

Please sign in to comment.