This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new fa36e7abd1 Fix typo: 'textOccurencesInLog' -> 'textOccurrencesInLog' 
(#11611)
fa36e7abd1 is described below

commit fa36e7abd1a68196d8a0ee4555bf18eb80ba898d
Author: 高春晖 <[email protected]>
AuthorDate: Thu Feb 5 19:21:46 2026 +0800

    Fix typo: 'textOccurencesInLog' -> 'textOccurrencesInLog' (#11611)
    
    * Fix typo: 'textOccurencesInLog' -> 'textOccurrencesInLog'
    
    Signed-off-by: 高春晖 <[email protected]>
    
    * Use deprecate-and-replace approach for API compatibility
    
    - 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: 高春晖 <[email protected]>
    
    ---------
    
    Signed-off-by: 高春晖 <[email protected]>
---
 .../src/main/java/org/apache/maven/it/Verifier.java      | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git 
a/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Verifier.java
 
b/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Verifier.java
index d8c6780580..32bc85f8f6 100644
--- 
a/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Verifier.java
+++ 
b/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/Verifier.java
@@ -594,25 +594,33 @@ public void verifyTextNotInLog(String text) throws 
VerificationException, IOExce
     }
 
     public static void verifyTextNotInLog(List<String> lines, String text) 
throws VerificationException {
-        if (textOccurencesInLog(lines, text) > 0) {
+        if (textOccurrencesInLog(lines, text) > 0) {
             throw new VerificationException("Text found in log: " + text);
         }
     }
 
     public static void verifyTextInLog(List<String> lines, String text) throws 
VerificationException {
-        if (textOccurencesInLog(lines, text) <= 0) {
+        if (textOccurrencesInLog(lines, text) <= 0) {
             throw new VerificationException("Text not found in log: " + text);
         }
     }
 
     public long textOccurrencesInLog(String text) throws IOException {
-        return textOccurencesInLog(loadLogLines(), text);
+        return textOccurrencesInLog(loadLogLines(), text);
     }
 
-    public static long textOccurencesInLog(List<String> lines, String text) {
+    public static long textOccurrencesInLog(List<String> lines, String text) {
         return lines.stream().filter(line -> 
stripAnsi(line).contains(text)).count();
     }
 
+    /**
+     * @deprecated Use {@link #textOccurrencesInLog(List, String)} instead
+     */
+    @Deprecated
+    public static long textOccurencesInLog(List<String> lines, String text) {
+        return textOccurrencesInLog(lines, text);
+    }
+
     /**
      * Checks whether the specified line is just an error message from 
Velocity. Especially old versions of Doxia employ
      * a very noisy Velocity instance.

Reply via email to