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

elharo pushed a commit to branch gen
in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git

commit b441fc96ab1b730ecf0426a5d7ebe5d9bbceab21
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Mon Jan 5 07:32:15 2026 -0500

    Collections.emptyList()
---
 .../maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java | 10 ++++------
 .../maven/plugins/checkstyle/exec/CheckstyleResultsTest.java   |  2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
 
b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
index 5ba6285..ac343d9 100644
--- 
a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java
@@ -658,9 +658,8 @@ public class CheckstyleViolationCheckMojo extends 
AbstractMojo {
     }
 
     private int countViolations(List<Violation> violations) {
-        List<RuleUtil.Matcher> ignores = violationIgnore == null
-                ? Collections.<RuleUtil.Matcher>emptyList()
-                : RuleUtil.parseMatchers(violationIgnore.split(","));
+        List<RuleUtil.Matcher> ignores =
+                violationIgnore == null ? Collections.emptyList() : 
RuleUtil.parseMatchers(violationIgnore.split(","));
 
         int ignored = 0;
         int countedViolations = 0;
@@ -691,9 +690,8 @@ public class CheckstyleViolationCheckMojo extends 
AbstractMojo {
             return;
         }
 
-        List<RuleUtil.Matcher> ignores = violationIgnore == null
-                ? Collections.<RuleUtil.Matcher>emptyList()
-                : RuleUtil.parseMatchers(violationIgnore.split(","));
+        List<RuleUtil.Matcher> ignores =
+                violationIgnore == null ? Collections.emptyList() : 
RuleUtil.parseMatchers(violationIgnore.split(","));
 
         violations.stream()
                 .filter(violation -> isViolation(violation.getSeverity()))
diff --git 
a/src/test/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResultsTest.java
 
b/src/test/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResultsTest.java
index 30d1945..eff5e87 100644
--- 
a/src/test/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResultsTest.java
+++ 
b/src/test/java/org/apache/maven/plugins/checkstyle/exec/CheckstyleResultsTest.java
@@ -123,7 +123,7 @@ public class CheckstyleResultsTest {
         assertEquals(3, results.getSeverityCount(SeverityLevel.ERROR), "test 
ERROR severity count");
         assertEquals(4, results.getSeverityCount(SeverityLevel.IGNORE), "test 
IGNORE severity count");
 
-        results.setFileViolations("file", Collections.<AuditEvent>emptyList());
+        results.setFileViolations("file", Collections.emptyList());
         assertEquals(0, results.getFileViolations("file").size(), "test file 
violations");
     }
 }

Reply via email to