You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by el...@apache.org on 2025/04/20 19:56:04 UTC
(maven-pmd-plugin) branch redun created (now 748d3c6)
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a change to branch redun
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git
at 748d3c6 remove redundant code
This branch includes the following new commits:
new 748d3c6 remove redundant code
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(maven-pmd-plugin) 01/01: remove redundant code
Posted by el...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch redun
in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git
commit 748d3c6710553fd1e00636ecc5934ca32aa946ca
Author: Elliotte Rusty Harold <el...@ibiblio.org>
AuthorDate: Sun Apr 20 15:55:54 2025 -0400
remove redundant code
---
.../java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java | 2 +-
src/main/java/org/apache/maven/plugins/pmd/exec/PmdResult.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java b/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java
index da5a7db..cdff7a0 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/ExcludeViolationsFromFile.java
@@ -53,7 +53,7 @@ public class ExcludeViolationsFromFile implements ExcludeFromFile<Violation> {
return;
}
final Properties props = new Properties();
- try (FileInputStream fileInputStream = new FileInputStream(new File(excludeFromFailureFile))) {
+ try (FileInputStream fileInputStream = new FileInputStream(excludeFromFailureFile)) {
props.load(fileInputStream);
} catch (final IOException e) {
throw new MojoExecutionException("Cannot load properties file " + excludeFromFailureFile, e);
diff --git a/src/main/java/org/apache/maven/plugins/pmd/exec/PmdResult.java b/src/main/java/org/apache/maven/plugins/pmd/exec/PmdResult.java
index 15cbe58..4cebf0c 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/exec/PmdResult.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/exec/PmdResult.java
@@ -95,7 +95,7 @@ public class PmdResult {
return c;
}
- while (c != -1 && c == BOM) {
+ while (c == BOM) {
c = super.read();
}
return c;