You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by la...@apache.org on 2023/04/07 19:38:06 UTC
[lucenenet] branch master updated: BREAKING: remove virtual designation as it's called from constructor (#804)
This is an automated email from the ASF dual-hosted git repository.
laimis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git
The following commit(s) were added to refs/heads/master by this push:
new d3bc7502f BREAKING: remove virtual designation as it's called from constructor (#804)
d3bc7502f is described below
commit d3bc7502f8aad1a2716dfd5cfbb54c4eebbff1f0
Author: Laimonas Simutis <la...@gmail.com>
AuthorDate: Fri Apr 7 12:37:59 2023 -0700
BREAKING: remove virtual designation as it's called from constructor (#804)
* remove virtual designation as it's called from constructor
---
src/Lucene.Net.Suggest/Spell/SpellChecker.cs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Lucene.Net.Suggest/Spell/SpellChecker.cs b/src/Lucene.Net.Suggest/Spell/SpellChecker.cs
index ae4b4232b..0f7b2d42b 100644
--- a/src/Lucene.Net.Suggest/Spell/SpellChecker.cs
+++ b/src/Lucene.Net.Suggest/Spell/SpellChecker.cs
@@ -143,7 +143,9 @@ namespace Lucene.Net.Search.Spell
/// <exception cref="ObjectDisposedException"> if the Spellchecker is already closed </exception>
/// <exception cref="IOException"> if spellchecker can not open the directory </exception>
// TODO: we should make this final as it is called in the constructor
- public virtual void SetSpellIndex(Directory spellIndexDir)
+ // LUCENENET specific - S1699 - marked non-virtual because calling
+ // virtual members from the constructor is not a safe operation in .NET
+ public void SetSpellIndex(Directory spellIndexDir)
{
// this could be the same directory as the current spellIndex
// modifications to the directory should be synchronized