NightOwl888 commented on code in PR #801: URL: https://github.com/apache/lucenenet/pull/801#discussion_r1160892817
########## src/Lucene.Net.Queries/Function/ValueSourceScorer.cs: ########## @@ -48,7 +48,9 @@ protected internal ValueSourceScorer(IndexReader reader, FunctionValues values) public virtual IndexReader Reader => m_reader; - public virtual void SetCheckDeletes(bool checkDeletes) + // LUCENENET specific - S1699 - marked non-virtual because calling + // virtual members from the constructor is not a safe operation in .NET + public void SetCheckDeletes(bool checkDeletes) Review Comment: Let's move this logic to a private `SetCheckDeletesInternal()` method that is called by the constructor and the virtual `SetCheckDeletes()` method. This just needs some docs to tell overriders that their overridden logic won't run in the constructor, so they will need to set this flag appropriately in their own constructor (it's fine to suggest adding a private method that is called in both places). -- 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