From 48907517e9d0beef86d28777dcfcd24b036622b4 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Fri, 17 Jan 2014 20:32:30 -0500 Subject: [PATCH] added an additional addIdentfier to support identifier confidence for issue #35 Former-commit-id: c36f85a13598ac9683db078c93ac495bf629f443 --- .../dependencycheck/dependency/Dependency.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 636640a1b..38a628baa 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 @@ -247,6 +247,20 @@ public class Dependency implements Comparable { this.identifiers.add(i); } + /** + * Adds an entry to the list of detected Identifiers for the dependency file. + * + * @param type the type of identifier (such as CPE) + * @param value the value of the identifier + * @param url the URL of the identifier + * @param confidence the confidence in the Identifier being accurate + */ + public void addIdentifier(String type, String value, String url, Confidence confidence) { + final Identifier i = new Identifier(type, value, url); + i.setConfidence(confidence); + this.identifiers.add(i); + } + /** * Adds an entry to the list of detected Identifiers for the dependency file. *