NightOwl888 commented on issue #1102:
URL: https://github.com/apache/lucenenet/issues/1102#issuecomment-2594553623

   A little insight into this. The `Reader` class in Java tracks some extra 
state that the .NET `TextReader` class does not. But this extra state is only 
required for a small number of classes in Lucene. So, rather than subclassing 
`TextReader` with a `Reader` class with the extra state and having to use 
adapters for every type of `TextReader` from .NET to turn it into a `Reader`, a 
new type named `BufferedCharFilter` was added to include both the functionality 
of `CharFilter` and the state from `BufferedReader` (which subclasses `Reader`) 
for those few types that required this extra tracking. This puts them in a 
different arrangement than in Java, so we need to account for this rewiring in 
the busines logic of `BufferedCharFilter`. The Harmony tests are from the 
`BufferedReader` class to ensure `BufferedCharFilter` does everything that 
`BufferedReader` does. Since this test was missing the `[Test]` attribute, it 
isn't too surprising that it doesn't pass by default and we need to ana
 lyze how the initial state of `IsReady` is managed in Java to fix the problem.
   
   Specifically, the extra state tracked in `Reader` is:
   
   - `mark` (an `int` to track a position)
   - `ready` (a `bool` to indicate whether the stream is ready to be read)


-- 
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: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to