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

sjaranowski pushed a commit to branch MCHANGES-437
in repository https://gitbox.apache.org/repos/asf/maven-changes-plugin.git

commit 338ce5140abd1c6427b31933c7bc04261f5bc30e
Author: Slawomir Jaranowski <s.jaranow...@gmail.com>
AuthorDate: Mon Nov 25 22:16:31 2024 +0100

    [MCHANGES-437] Drop usage of deprecated items
---
 src/main/java/org/apache/maven/plugins/changes/ChangesReport.java     | 4 +++-
 .../maven/plugins/changes/schema/DefaultChangesSchemaValidator.java   | 2 +-
 src/main/java/org/apache/maven/plugins/github/GitHubReport.java       | 1 +
 src/main/java/org/apache/maven/plugins/jira/JiraReport.java           | 1 +
 src/main/java/org/apache/maven/plugins/trac/TracReport.java           | 1 +
 5 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugins/changes/ChangesReport.java 
b/src/main/java/org/apache/maven/plugins/changes/ChangesReport.java
index af78033..aaab4ae 100644
--- a/src/main/java/org/apache/maven/plugins/changes/ChangesReport.java
+++ b/src/main/java/org/apache/maven/plugins/changes/ChangesReport.java
@@ -306,6 +306,7 @@ public class ChangesReport extends AbstractChangesReport {
     }
 
     @Override
+    @Deprecated
     public String getOutputName() {
         return "changes-report";
     }
@@ -337,7 +338,8 @@ public class ChangesReport extends AbstractChangesReport {
             }
             try {
                 // so we get encoding from the file itself
-                try (XmlStreamReader xmlStreamReader = new 
XmlStreamReader(changesXml)) {
+                try (XmlStreamReader xmlStreamReader =
+                        XmlStreamReader.builder().setFile(changesXml).get()) {
                     String encoding = xmlStreamReader.getEncoding();
                     File resultFile = new File(
                             filteredOutputDirectory,
diff --git 
a/src/main/java/org/apache/maven/plugins/changes/schema/DefaultChangesSchemaValidator.java
 
b/src/main/java/org/apache/maven/plugins/changes/schema/DefaultChangesSchemaValidator.java
index 066c99c..4e821ce 100644
--- 
a/src/main/java/org/apache/maven/plugins/changes/schema/DefaultChangesSchemaValidator.java
+++ 
b/src/main/java/org/apache/maven/plugins/changes/schema/DefaultChangesSchemaValidator.java
@@ -64,7 +64,7 @@ public class DefaultChangesSchemaValidator implements 
ChangesSchemaValidator {
 
             validator.setErrorHandler(baseHandler);
 
-            try (Reader reader = new XmlStreamReader(file)) {
+            try (Reader reader = 
XmlStreamReader.builder().setFile(file).get()) {
                 validator.validate(new StreamSource(reader));
             }
 
diff --git a/src/main/java/org/apache/maven/plugins/github/GitHubReport.java 
b/src/main/java/org/apache/maven/plugins/github/GitHubReport.java
index 8c40a34..cf6fe9e 100644
--- a/src/main/java/org/apache/maven/plugins/github/GitHubReport.java
+++ b/src/main/java/org/apache/maven/plugins/github/GitHubReport.java
@@ -135,6 +135,7 @@ public class GitHubReport extends AbstractChangesReport {
     /* --------------------------------------------------------------------- */
 
     @Override
+    @Deprecated
     public String getOutputName() {
         return "github-report";
     }
diff --git a/src/main/java/org/apache/maven/plugins/jira/JiraReport.java 
b/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
index e22d2bb..4b13c97 100644
--- a/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
+++ b/src/main/java/org/apache/maven/plugins/jira/JiraReport.java
@@ -366,6 +366,7 @@ public class JiraReport extends AbstractChangesReport {
     }
 
     @Override
+    @Deprecated
     public String getOutputName() {
         return "jira-report";
     }
diff --git a/src/main/java/org/apache/maven/plugins/trac/TracReport.java 
b/src/main/java/org/apache/maven/plugins/trac/TracReport.java
index 87a8101..bc2511b 100644
--- a/src/main/java/org/apache/maven/plugins/trac/TracReport.java
+++ b/src/main/java/org/apache/maven/plugins/trac/TracReport.java
@@ -184,6 +184,7 @@ public class TracReport extends AbstractChangesReport {
     }
 
     @Override
+    @Deprecated
     public String getOutputName() {
         return "trac-report";
     }

Reply via email to