Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify IndexReader constructor #919

Open
paulirwin opened this issue Feb 24, 2024 · 0 comments
Open

Simplify IndexReader constructor #919

paulirwin opened this issue Feb 24, 2024 · 0 comments
Labels
good-first-issue Good for newcomers is:enhancement New feature or request performance pri:low up-for-grabs This issue is open to be worked on by anyone

Comments

@paulirwin
Copy link
Contributor

The IndexReader constructor is:

private protected IndexReader() // LUCENENET: Changed from internal to private protected
{
if (!(this is CompositeReader || this is AtomicReader))
{
throw Error.Create("IndexReader should never be directly extended, subclass AtomicReader or CompositeReader instead.");
}
}

We can remove the check and error message, since it is declared private protected. But we will need a LUCENENET specific comment to indicate we removed it in the .NET version and enforced it at the compiler level. There may also be tests to confirm this exception is thrown.

This can be another issue that is outside of the scope of this PR.

Originally posted by @NightOwl888 in #914 (comment)

@NightOwl888 NightOwl888 added performance up-for-grabs This issue is open to be worked on by anyone good-first-issue Good for newcomers is:enhancement New feature or request pri:low labels Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for newcomers is:enhancement New feature or request performance pri:low up-for-grabs This issue is open to be worked on by anyone
Projects
None yet
Development

No branches or pull requests

2 participants