Skip to content

Commit

Permalink
Update ThirdPartyAuditTask to check for and list pointless exclusions. (
Browse files Browse the repository at this point in the history
#2760)

This change swaps the order of the task to first check for no pointless exclusions.
If not caught first these will be thrown inside of the bogusExcludesCount block that logs a
useless error message.

Signed-off-by: Marc Handalian <[email protected]>
  • Loading branch information
mch2 authored Apr 5, 2022
1 parent 6103010 commit 21f9950
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ public void runThirdPartyAudit() throws IOException {
Set<String> jdkJarHellClasses = runJdkJarHellCheck();

if (missingClassExcludes != null) {
assertNoPointlessExclusions("are not missing", missingClassExcludes, missingClasses);
long bogousExcludesCount = Stream.concat(missingClassExcludes.stream(), violationsExcludes.stream())
.filter(each -> missingClasses.contains(each) == false)
.filter(each -> violationsClasses.contains(each) == false)
Expand All @@ -247,7 +248,6 @@ public void runThirdPartyAudit() throws IOException {
"All excluded classes seem to have no issues. " + "This is sometimes an indication that the check silently failed"
);
}
assertNoPointlessExclusions("are not missing", missingClassExcludes, missingClasses);
missingClasses.removeAll(missingClassExcludes);
}
assertNoPointlessExclusions("have no violations", violationsExcludes, violationsClasses);
Expand Down

0 comments on commit 21f9950

Please sign in to comment.