From 9c21f75d378727e028c656960e39a2a7d24dc716 Mon Sep 17 00:00:00 2001 From: Paul Irwin Date: Tue, 26 Nov 2024 17:25:32 -0700 Subject: [PATCH] Resolve build warnings and errors --- .../Analysis/NGram/NGramTokenFilter.cs | 10 +++++++++- .../TokenAttributes/MorphosyntacticTagsAttribute.cs | 3 --- src/Lucene.Net/Analysis/Token.cs | 2 +- .../Extensions/CharTermAttributeExtensions.cs | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Lucene.Net.Analysis.Common/Analysis/NGram/NGramTokenFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/NGram/NGramTokenFilter.cs index e4749a4896..4d38a134ef 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/NGram/NGramTokenFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/NGram/NGramTokenFilter.cs @@ -124,6 +124,10 @@ public int PositionIncrement // LUCENENET specific - The interface requires this to be implemented, since we added it to avoid casts. public void CopyTo(IAttribute target) => _ = target; + + public void Clear() + { + } } private sealed class PositionLengthAttributeAnonymousClass : IPositionLengthAttribute @@ -136,6 +140,10 @@ public int PositionLength // LUCENENET specific - The interface requires this to be implemented, since we added it to avoid casts. public void CopyTo(IAttribute target) => _ = target; + + public void Clear() + { + } } /// @@ -233,4 +241,4 @@ public override void Reset() curTermBuffer = null; } } -} \ No newline at end of file +} diff --git a/src/Lucene.Net.Analysis.Morfologik/Morfologik/TokenAttributes/MorphosyntacticTagsAttribute.cs b/src/Lucene.Net.Analysis.Morfologik/Morfologik/TokenAttributes/MorphosyntacticTagsAttribute.cs index e537403f25..43a981dd51 100644 --- a/src/Lucene.Net.Analysis.Morfologik/Morfologik/TokenAttributes/MorphosyntacticTagsAttribute.cs +++ b/src/Lucene.Net.Analysis.Morfologik/Morfologik/TokenAttributes/MorphosyntacticTagsAttribute.cs @@ -37,8 +37,5 @@ public interface IMorphosyntacticTagsAttribute : IAttribute /// The default value (no-value) is null. Returns a list of POS tags corresponding to current lemma. /// IList Tags { get; set; } - - /// Clear to default value. - void Clear(); } } diff --git a/src/Lucene.Net/Analysis/Token.cs b/src/Lucene.Net/Analysis/Token.cs index a1342d88c7..6752252bf4 100644 --- a/src/Lucene.Net/Analysis/Token.cs +++ b/src/Lucene.Net/Analysis/Token.cs @@ -65,7 +65,7 @@ namespace Lucene.Net.Analysis /// Failing that, to create a new you should first use /// one of the constructors that starts with null text. To load /// the token from a char[] use . - /// To load from a use (or ) followed by + /// To load from a use (or ) followed by /// or . /// Alternatively you can get the 's termBuffer by calling either , /// if you know that your text is shorter than the capacity of the termBuffer diff --git a/src/Lucene.Net/Support/Analysis/TokenAttributes/Extensions/CharTermAttributeExtensions.cs b/src/Lucene.Net/Support/Analysis/TokenAttributes/Extensions/CharTermAttributeExtensions.cs index f5328c2cfc..c8ca20e76a 100644 --- a/src/Lucene.Net/Support/Analysis/TokenAttributes/Extensions/CharTermAttributeExtensions.cs +++ b/src/Lucene.Net/Support/Analysis/TokenAttributes/Extensions/CharTermAttributeExtensions.cs @@ -53,7 +53,7 @@ public static ICharTermAttribute SetLength(this ICharTermAttribute termAttr, int /// Sets the length of the termBuffer to zero. /// Use this method before appending contents. /// - /// NOTE: This is exactly the same operation as calling , the primary + /// NOTE: This is exactly the same operation as calling , the primary /// difference is that this method returns a reference to the current object so it can be chained. /// /// obj.SetEmpty().Append("hey you");