hack resolution to issue #172 - more information is needed to fully resolve the issue though

Former-commit-id: 366299924689cca0e277fd82b9f7bd40b9c19490
This commit is contained in:
Jeremy Long
2014-12-09 06:36:04 -05:00
parent 8fdc2007e0
commit ce8d5bc635

View File

@@ -610,8 +610,15 @@ public class Dependency implements Serializable, Comparable<Dependency> {
* @param dependency a reference to the related dependency * @param dependency a reference to the related dependency
*/ */
public void addRelatedDependency(Dependency dependency) { public void addRelatedDependency(Dependency dependency) {
if (this == dependency) {
LOGGER.warning("Attempted to add a circular reference - please post the log file to issue #172 here "
+ "https://github.com/jeremylong/DependencyCheck/issues/172 ");
LOGGER.log(Level.FINE, "this: {0}", this.toString());
LOGGER.log(Level.FINE, "dependency: {0}", dependency.toString());
} else {
relatedDependencies.add(dependency); relatedDependencies.add(dependency);
} }
}
/** /**
* Implementation of the Comparable<Dependency> interface. The comparison is solely based on the file name. * Implementation of the Comparable<Dependency> interface. The comparison is solely based on the file name.