paulirwin commented on code in PR #1139:
URL: https://github.com/apache/lucenenet/pull/1139#discussion_r1989799014
##########
src/Lucene.Net.Analysis.Common/Analysis/El/GreekStemmer.cs:
##########
@@ -994,39 +994,40 @@ private static int Rule22(char[] s, int len) //
LUCENENET: CA1822: Mark members
return len;
}
- /// <summary>
- /// Checks if the word contained in the leading portion of char[]
array ,
- /// ends with the suffix given as parameter.
- /// </summary>
- /// <param name="s"> A char[] array that represents a word. </param>
- /// <param name="len"> The length of the char[] array. </param>
- /// <param name="suffix"> A <see cref="string"/> object to check if
the word given ends with these characters. </param>
- /// <returns> True if the word ends with the suffix given , false
otherwise. </returns>
- private static bool EndsWith(char[] s, int len, string suffix) //
LUCENENET: CA1822: Mark members as static
- {
- int suffixLen = suffix.Length;
- if (suffixLen > len)
- {
- return false;
- }
- for (int i = suffixLen - 1; i >= 0; i--)
- {
- if (s[len - (suffixLen - i)] != suffix[i])
- {
- return false;
- }
- }
-
- return true;
- }
+ // LUCENENET: commented out unused private method
+ // /// <summary>
+ // /// Checks if the word contained in the leading portion of char[]
array ,
+ // /// ends with the suffix given as parameter.
+ // /// </summary>
+ // /// <param name="s"> A char[] array that represents a word. </param>
+ // /// <param name="len"> The length of the char[] array. </param>
+ // /// <param name="suffix"> A <see cref="string"/> object to check if
the word given ends with these characters. </param>
+ // /// <returns> True if the word ends with the suffix given , false
otherwise. </returns>
+ // private static bool EndsWith(char[] s, int len, string suffix) //
LUCENENET: CA1822: Mark members as static
Review Comment:
It's not redundant in this case, because it is not sliced when passed in
(and there are many, many calls to this that would have to be updated to do
that), but I'll change it to `char[]` even though I disagree with the
reasoning.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]