diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java index 4b9ad3627..0cbcef15e 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/Dependency.java @@ -666,16 +666,13 @@ public class Dependency implements Serializable, Comparable { * @param dependency a reference to the related dependency */ public void addRelatedDependency(Dependency dependency) { - boolean debug = false; if (this == dependency) { LOGGER.warn("Attempted to add a circular reference - please post the log file to issue #172 here " + "https://github.com/jeremylong/DependencyCheck/issues/172"); - debug = true; + LOGGER.debug("this: {}", this); + LOGGER.debug("dependency: {}", dependency); } else if (!relatedDependencies.add(dependency)) { - LOGGER.warn("Failed to add dependency, likely due to referencing the same file as another dependency in the set."); - debug = true; - } - if (debug) { + LOGGER.debug("Failed to add dependency, likely due to referencing the same file as another dependency in the set."); LOGGER.debug("this: {}", this); LOGGER.debug("dependency: {}", dependency); }