From aa9bc5c9b430c33227bdf161ae41cd658d62543e Mon Sep 17 00:00:00 2001 From: Joep Weijers Date: Fri, 21 Jun 2019 17:09:21 +0200 Subject: [PATCH] Add a logMissingSignatures parameter, to prevent the logging of missing signatures --- src/main/java/de/thetaphi/forbiddenapis/Checker.java | 1 + .../java/de/thetaphi/forbiddenapis/Signatures.java | 8 +++++--- .../forbiddenapis/maven/AbstractCheckMojo.java | 12 +++++++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/thetaphi/forbiddenapis/Checker.java b/src/main/java/de/thetaphi/forbiddenapis/Checker.java index 4b97ffeb..1f8bf90e 100644 --- a/src/main/java/de/thetaphi/forbiddenapis/Checker.java +++ b/src/main/java/de/thetaphi/forbiddenapis/Checker.java @@ -54,6 +54,7 @@ public static enum Option { FAIL_ON_MISSING_CLASSES, FAIL_ON_VIOLATION, FAIL_ON_UNRESOLVABLE_SIGNATURES, + LOG_MISSING_SIGNATURES, DISABLE_CLASSLOADING_CACHE } diff --git a/src/main/java/de/thetaphi/forbiddenapis/Signatures.java b/src/main/java/de/thetaphi/forbiddenapis/Signatures.java index 195e599c..ae92dc40 100644 --- a/src/main/java/de/thetaphi/forbiddenapis/Signatures.java +++ b/src/main/java/de/thetaphi/forbiddenapis/Signatures.java @@ -78,6 +78,7 @@ private UnresolvableReporting(boolean reportClassNotFound) { private final RelatedClassLookup lookup; private final Logger logger; private final boolean failOnUnresolvableSignatures; + private final boolean logMissingSignatures; /** Key is used to lookup forbidden signature in following formats: *