diff --git a/src/Lucene.Net/Index/IndexReader.cs b/src/Lucene.Net/Index/IndexReader.cs index 518cbde041..429a124582 100644 --- a/src/Lucene.Net/Index/IndexReader.cs +++ b/src/Lucene.Net/Index/IndexReader.cs @@ -85,10 +85,11 @@ public abstract partial class IndexReader : IDisposable 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."); - } + // LUCENENET NOTE: this is enforced by the compiler in .NET due to `private protected`, so we don't need to check it here. + // if (!(this is CompositeReader || this is AtomicReader)) + // { + // throw Error.Create("IndexReader should never be directly extended, subclass AtomicReader or CompositeReader instead."); + // } } #if !FEATURE_CONDITIONALWEAKTABLE_ENUMERATOR