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-pmd-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new fc1c0a2 remove redundant code (#193)
fc1c0a2 is described below
commit fc1c0a20cc78cf72c5bc4f8868f2ef410cb17113
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Mon Apr 21 13:47:33 2025 +0000
remove redundant code (#193)
---
.../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;