From bc2c3f67d7ea0acb8060bdd45bc4b8b55c90ca15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Oct 2021 17:03:09 +0000 Subject: [PATCH 1/6] Bump codingstyle-pom from 2.9.0 to 2.10.0 Bumps [codingstyle-pom](https://github.com/uhafner/codingstyle-pom) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/uhafner/codingstyle-pom/releases) - [Changelog](https://github.com/uhafner/codingstyle-pom/blob/main/CHANGELOG.md) - [Commits](https://github.com/uhafner/codingstyle-pom/compare/v2.9.0...v2.10.0) --- updated-dependencies: - dependency-name: edu.hm.hafner:codingstyle-pom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7b00a0729..f22986b14 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ edu.hm.hafner codingstyle-pom - 2.9.0 + 2.10.0 From e6dad3607f330869f8e9b6ac89d4677edb3fb674 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Fri, 8 Oct 2021 12:26:33 +0200 Subject: [PATCH 2/6] Suppress SpotBugs warning about returning mutable `Report` instances. --- src/main/java/edu/hm/hafner/analysis/IssueDifference.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/edu/hm/hafner/analysis/IssueDifference.java b/src/main/java/edu/hm/hafner/analysis/IssueDifference.java index 3dc917b64..c92232e22 100644 --- a/src/main/java/edu/hm/hafner/analysis/IssueDifference.java +++ b/src/main/java/edu/hm/hafner/analysis/IssueDifference.java @@ -8,6 +8,8 @@ import java.util.Optional; import java.util.UUID; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Computes old, new, and fixed issues based on the reports of two consecutive static analysis runs for the same * software artifact. @@ -124,6 +126,7 @@ private List findReferenceByEquals(final Issue current) { * * @return the outstanding issues */ + @SuppressFBWarnings("EI") public Report getOutstandingIssues() { return outstandingIssues; } @@ -134,6 +137,7 @@ public Report getOutstandingIssues() { * * @return the new issues */ + @SuppressFBWarnings("EI") public Report getNewIssues() { return newIssues; } @@ -144,6 +148,7 @@ public Report getNewIssues() { * * @return the fixed issues */ + @SuppressFBWarnings("EI") public Report getFixedIssues() { return fixedIssues; } From 2b6acd8cac9f1dfb1a6213c9e1f092e6747fc084 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sat, 9 Oct 2021 11:40:28 +0200 Subject: [PATCH 3/6] Suppress some more EI warnings. --- src/main/java/edu/hm/hafner/analysis/FilteredLog.java | 3 +++ src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java | 3 +++ .../edu/hm/hafner/analysis/parser/dry/dupfinder/Fragment.java | 2 +- .../java/edu/hm/hafner/analysis/parser/jcreport/Report.java | 3 +++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/hm/hafner/analysis/FilteredLog.java b/src/main/java/edu/hm/hafner/analysis/FilteredLog.java index 65fdc5a64..548eb4590 100644 --- a/src/main/java/edu/hm/hafner/analysis/FilteredLog.java +++ b/src/main/java/edu/hm/hafner/analysis/FilteredLog.java @@ -6,6 +6,8 @@ import com.google.errorprone.annotations.FormatMethod; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Filters the log of a {@link Report} instance so that only a limited number of errors will be reported. If the number * of errors exceeds this limit, then subsequent error messages will be skipped. @@ -42,6 +44,7 @@ public FilteredLog(final Report report, final String title) { * @param maxLines * the maximum number of lines to log */ + @SuppressFBWarnings(value = "EI") public FilteredLog(final Report report, final String title, final int maxLines) { delegate = report; this.title = title; diff --git a/src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java b/src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java index 47d31e321..6fdcd1d98 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java @@ -26,6 +26,8 @@ import java.util.ArrayList; import java.util.List; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Entity used by {@link CcmParser} to represent the root node of CCM results file. * @@ -33,6 +35,7 @@ * @since 1.0 */ @SuppressWarnings("all") +@SuppressFBWarnings(value = "EI") public class Ccm { /** * List of metrics present in the XML file. diff --git a/src/main/java/edu/hm/hafner/analysis/parser/dry/dupfinder/Fragment.java b/src/main/java/edu/hm/hafner/analysis/parser/dry/dupfinder/Fragment.java index 0db2a7e35..274d0f705 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/dry/dupfinder/Fragment.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/dry/dupfinder/Fragment.java @@ -9,6 +9,7 @@ * @author Rafal Jasica */ @SuppressWarnings("PMD.DataClass") +@SuppressFBWarnings("EI") public class Fragment { @CheckForNull private String fileName; @@ -90,7 +91,6 @@ public Range getOffsetRange() { return offsetRange; } - /** * Sets the offset range to the specified value. * diff --git a/src/main/java/edu/hm/hafner/analysis/parser/jcreport/Report.java b/src/main/java/edu/hm/hafner/analysis/parser/jcreport/Report.java index 1c89f041e..c1385fd24 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/jcreport/Report.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/jcreport/Report.java @@ -4,6 +4,8 @@ import java.util.Collections; import java.util.List; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * This is the Report-Class. It is mandatory to create Warnings. It represents the outer-most node within the * report.xml. @@ -11,6 +13,7 @@ * @author Johann Vierthaler, johann.vierthaler@web.de */ @SuppressWarnings("PMD.DataClass") +@SuppressFBWarnings(value = "EI") public class Report { private List files = new ArrayList<>(); From abf675bcc23e913893dabccd91d14df5c4877ed8 Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sat, 9 Oct 2021 15:31:47 +0200 Subject: [PATCH 4/6] Fix warnings. --- src/main/java/edu/hm/hafner/analysis/FilteredLog.java | 2 +- src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/edu/hm/hafner/analysis/FilteredLog.java b/src/main/java/edu/hm/hafner/analysis/FilteredLog.java index 548eb4590..f5fcd86f0 100644 --- a/src/main/java/edu/hm/hafner/analysis/FilteredLog.java +++ b/src/main/java/edu/hm/hafner/analysis/FilteredLog.java @@ -44,7 +44,7 @@ public FilteredLog(final Report report, final String title) { * @param maxLines * the maximum number of lines to log */ - @SuppressFBWarnings(value = "EI") + @SuppressFBWarnings(value = "EI", justification = "Report is used as a delegate") public FilteredLog(final Report report, final String title, final int maxLines) { delegate = report; this.title = title; diff --git a/src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java b/src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java index 6fdcd1d98..a1126d2fc 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/ccm/Ccm.java @@ -35,7 +35,7 @@ * @since 1.0 */ @SuppressWarnings("all") -@SuppressFBWarnings(value = "EI") +@SuppressFBWarnings("EI") public class Ccm { /** * List of metrics present in the XML file. From 0cbd22de0957734f9003f6ac56942df09e0b1d6f Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sat, 9 Oct 2021 15:32:04 +0200 Subject: [PATCH 5/6] Bump version of codingstyle to latest. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f22986b14..0b01e7364 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ edu.hm.hafner codingstyle-pom - 2.10.0 + 2.11.0 @@ -60,7 +60,7 @@ https://repo.jenkins-ci.org/incrementals/ - 2.8.0 + 2.10.0 ${codingstyle.library.version} 1.33 From 27da788e2dcec7134383c9a05bcf660d3e8bb6fc Mon Sep 17 00:00:00 2001 From: Ulli Hafner Date: Sat, 9 Oct 2021 18:58:35 +0200 Subject: [PATCH 6/6] Fix PMD warning. --- .../java/edu/hm/hafner/analysis/parser/jcreport/Report.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/hm/hafner/analysis/parser/jcreport/Report.java b/src/main/java/edu/hm/hafner/analysis/parser/jcreport/Report.java index c1385fd24..9bbb70df4 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/jcreport/Report.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/jcreport/Report.java @@ -13,7 +13,7 @@ * @author Johann Vierthaler, johann.vierthaler@web.de */ @SuppressWarnings("PMD.DataClass") -@SuppressFBWarnings(value = "EI") +@SuppressFBWarnings("EI") public class Report { private List files = new ArrayList<>();