This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch xml in repository https://gitbox.apache.org/repos/asf/maven-checkstyle-plugin.git
commit edbb796c4205ded6fed1061ef52aab1224d3bcaf Author: Elliotte Rusty Harold <[email protected]> AuthorDate: Wed Jan 7 08:30:17 2026 -0500 wip --- .../maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java | 5 +++-- 1 file changed, 3 insertions(+), 2 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 ac343d9..a86a1f2 100644 --- a/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java +++ b/src/main/java/org/apache/maven/plugins/checkstyle/CheckstyleViolationCheckMojo.java @@ -18,6 +18,7 @@ */ package org.apache.maven.plugins.checkstyle; +import java.io.InputStream; import javax.inject.Inject; import javax.inject.Named; @@ -579,9 +580,9 @@ public class CheckstyleViolationCheckMojo extends AbstractMojo { return; } - try (Reader reader = new BufferedReader(ReaderFactory.newXmlReader(outputXmlFile))) { + try (InputStream in = Files.newInputStream(outputXmlFile.toPath())) { XmlPullParser xpp = new MXParser(); - xpp.setInput(reader); + xpp.se(in); final List<Violation> violationsList = getViolations(xpp); long violationCount = countViolations(violationsList);
