bug fixes

Former-commit-id: e6e1292842528039ab4498d65239759e6729a70a
This commit is contained in:
Jeremy Long
2013-05-09 22:34:47 -04:00
parent a1c7612a85
commit 2e3331f568
8 changed files with 67 additions and 24 deletions

View File

@@ -68,7 +68,7 @@ public class Dependency implements Comparable<Dependency> {
/**
* A list of Identifiers.
*/
private List<Identifier> identifiers;
private Set<Identifier> identifiers;
/**
* A collection of vendor evidence.
*/
@@ -89,7 +89,7 @@ public class Dependency implements Comparable<Dependency> {
vendorEvidence = new EvidenceCollection();
productEvidence = new EvidenceCollection();
versionEvidence = new EvidenceCollection();
identifiers = new ArrayList<Identifier>();
identifiers = new TreeSet<Identifier>();
vulnerabilities = new TreeSet<Vulnerability>(new VulnerabilityComparator());
}
@@ -222,7 +222,7 @@ public class Dependency implements Comparable<Dependency> {
*
* @return an ArrayList of Identifiers.
*/
public List<Identifier> getIdentifiers() {
public Set<Identifier> getIdentifiers() {
return this.identifiers;
}
@@ -231,7 +231,7 @@ public class Dependency implements Comparable<Dependency> {
*
* @param identifiers A list of Identifiers.
*/
public void setIdentifiers(List<Identifier> identifiers) {
public void setIdentifiers(Set<Identifier> identifiers) {
this.identifiers = identifiers;
}

View File

@@ -31,7 +31,7 @@ public class Identifier implements Comparable<Identifier> {
* @param value the identifier value.
* @param url the identifier url.
*/
Identifier(String type, String value, String url) {
public Identifier(String type, String value, String url) {
this.type = type;
this.value = value;
this.url = url;
@@ -45,7 +45,7 @@ public class Identifier implements Comparable<Identifier> {
* @param url the identifier url.
* @param description the description of the identifier.
*/
Identifier(String type, String value, String url, String description) {
public Identifier(String type, String value, String url, String description) {
this(type, value, url);
this.description = description;
}