Fix typo: 'textOccurencesInLog' -> 'textOccurrencesInLog'#11611
Merged
elharo merged 2 commits intoapache:masterfrom Feb 5, 2026
Merged
Fix typo: 'textOccurencesInLog' -> 'textOccurrencesInLog'#11611elharo merged 2 commits intoapache:masterfrom
elharo merged 2 commits intoapache:masterfrom
Conversation
Signed-off-by: 高春晖 <18220699480@163.com>
elharo
reviewed
Dec 30, 2025
| } | ||
|
|
||
| public static long textOccurencesInLog(List<String> lines, String text) { | ||
| public static long textOccurrencesInLog(List<String> lines, String text) { |
Contributor
There was a problem hiding this comment.
This is a public method. Not sure we can just rename it. Might have to deprecate and replace depending on when it was added
Contributor
Author
|
Thanks for the feedback! You're absolutely right about API compatibility. I'll update the PR to use the deprecate-and-replace approach: /**
* @deprecated Use {@link #textOccurrencesInLog(List, String)} instead
*/
@Deprecated
public static long textOccurencesInLog(List<String> lines, String text) {
return textOccurrencesInLog(lines, text);
}
public static long textOccurrencesInLog(List<String> lines, String text) {
return lines.stream().filter(line -> stripAnsi(line).contains(text)).count();
}This way:
I'll push the updated changes shortly. |
- Keep the old method textOccurencesInLog with @deprecated annotation - Add new method textOccurrencesInLog with correct spelling - Old method delegates to new method for backward compatibility Signed-off-by: 高春晖 <18220699480@163.com>
Pankraz76
approved these changes
Jan 8, 2026
elharo
approved these changes
Jan 8, 2026
elharo
approved these changes
Jan 12, 2026
|
@elharo Please assign appropriate label to PR according to the type of change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix typo in method name: 'textOccurencesInLog' -> 'textOccurrencesInLog'