paulirwin opened a new pull request, #1081:
URL: https://github.com/apache/lucenenet/pull/1081

   - [X] You've read the [Contributor 
Guide](https://github.com/apache/lucenenet/blob/main/CONTRIBUTING.md) and [Code 
of Conduct](https://www.apache.org/foundation/policies/conduct.html).
   - [ ] You've included unit or integration tests for your change, where 
applicable.
   - [X] You've included inline docs for your change, where applicable.
   - [X] There's an open issue for the PR that you are making. If you'd like to 
propose a change, please [open an 
issue](https://github.com/apache/lucenenet/issues/new/choose) to discuss the 
change or find an existing issue.
   
   Simplify IndexReader constructor.
   
   Fixes #919
   
   ## Description
   
   This removes the type check in the IndexReader constructor that ensures that 
only CompositeReader and AtomicReader are allowed subtypes. This is not needed 
since in C# we can use the `private protected` modifier to ensure that no 
outside classes can subtype this. This removes the need for the runtime check 
in the constructor, which will mildly improve performance. A comment was left 
explaining the divergence with the original commented-out code.


-- 
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