NightOwl888 commented on code in PR #1113:
URL: https://github.com/apache/lucenenet/pull/1113#discussion_r1923195245
##########
src/Lucene.Net.QueryParser/Surround/Parser/QueryParserTokenManager.cs:
##########
@@ -33,7 +33,7 @@ public class QueryParserTokenManager //: QueryParserConstants
{
/// <summary>Debug output. </summary>
#pragma warning disable IDE0052 // Remove unread private members
- private TextWriter debugStream; // LUCENENET specific - made private,
since we already have a setter
+ private TextWriter debugStream = TextWriter.Null; // LUCENENET
specific - made private, since we already have a setter
Review Comment:
This is apparently garbage that was caused by the generated code in Java. In
the latest version, they have replaced the `debugStream` field and the
`SetDebugStream()` method with a comment that says
```java
/** Debug output. */
// (debugStream omitted).
```
Let's just replace it with a comment, since this isn't used, anyway.
https://github.com/apache/lucene/blob/7e20d5b3aad13739a2ae9fa36774e68ccae43ac4/lucene/queryparser/src/java/org/apache/lucene/queryparser/surround/parser/QueryParserTokenManager.java#L25-L26
```c#
/** Debug output. */
// LUCENENET: debugStream/SetDebugStream() omitted, since it is unused
and has been omitted in later versions of Lucene
```
##########
src/Lucene.Net.QueryParser/Flexible/Standard/Parser/StandardSyntaxParserTokenManager.cs:
##########
@@ -32,7 +31,7 @@ public class StandardSyntaxParserTokenManager /*:
StandardSyntaxParserConstants*
{
/// <summary>Debug output.</summary>
#pragma warning disable IDE0052 // Remove unread private members
- private TextWriter debugStream = Console.Out; // LUCENENET specific -
made private, since we already have a setter
+ private TextWriter debugStream = TextWriter.Null; // LUCENENET
specific - made private, since we already have a setter
Review Comment:
This is apparently garbage that was caused by the generated code in Java. In
the latest version, they have replaced the `debugStream` field and the
`SetDebugStream()` method with a comment that says
```java
/** Debug output. */
// (debugStream omitted).
```
Let's just replace it with a comment, since this isn't used, anyway.
https://github.com/apache/lucene/blob/7e20d5b3aad13739a2ae9fa36774e68ccae43ac4/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/standard/parser/StandardSyntaxParserTokenManager.java#L77-L78
```c#
/** Debug output. */
// LUCENENET: debugStream/SetDebugStream() omitted, since it is unused
and has been omitted in later versions of Lucene
```
##########
src/Lucene.Net.QueryParser/Classic/QueryParserTokenManager.cs:
##########
@@ -31,7 +30,7 @@ public class QueryParserTokenManager //: QueryParserConstants
{
/// <summary>Debug output. </summary>
#pragma warning disable IDE0052 // Remove unread private members
- private TextWriter debugStream = Console.Out; // LUCENENET specific -
made private, since we already have a setter
+ private TextWriter debugStream = TextWriter.Null; // LUCENENET
specific - made private, since we already have a setter
Review Comment:
This is apparently garbage that was caused by the generated code in Java. In
the latest version, they have replaced the `debugStream` field and the
`SetDebugStream()` method with a comment that says
```java
/** Debug output. */
// (debugStream omitted).
```
Let's just replace it with a comment, since this isn't used, anyway.
https://github.com/apache/lucene/blob/7e20d5b3aad13739a2ae9fa36774e68ccae43ac4/lucene/queryparser/src/java/org/apache/lucene/queryparser/classic/QueryParserTokenManager.java#L22-L23
```c#
/** Debug output. */
// LUCENENET: debugStream/SetDebugStream() omitted, since it is unused
and has been omitted in later versions of Lucene
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]