updated to use SortedSet instead of Set in a couple of places

Former-commit-id: 87a86825e814d183af8957a0b0c284e20623fc19
This commit is contained in:
Jeremy Long
2013-04-18 05:50:17 -04:00
parent b888e1b5f8
commit f064c1a229
2 changed files with 6 additions and 4 deletions

View File

@@ -401,7 +401,7 @@ public class Dependency {
* *
* @return the list of vulnerabilities * @return the list of vulnerabilities
*/ */
public Set<Vulnerability> getVulnerabilities() { public SortedSet<Vulnerability> getVulnerabilities() {
return vulnerabilities; return vulnerabilities;
} }

View File

@@ -21,6 +21,8 @@ package org.owasp.dependencycheck.dependency;
import java.io.Serializable; import java.io.Serializable;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
/** /**
* Contains the information about a vulnerability. * Contains the information about a vulnerability.
@@ -126,14 +128,14 @@ public class Vulnerability implements Serializable, Comparable<Vulnerability> {
/** /**
* A set of vulnerable software. * A set of vulnerable software.
*/ */
private Set<VulnerableSoftware> vulnerableSoftware = new HashSet<VulnerableSoftware>(); private SortedSet<VulnerableSoftware> vulnerableSoftware = new TreeSet<VulnerableSoftware>();
/** /**
* Get the value of vulnerableSoftware. * Get the value of vulnerableSoftware.
* *
* @return the value of vulnerableSoftware * @return the value of vulnerableSoftware
*/ */
public Set<VulnerableSoftware> getVulnerableSoftware() { public SortedSet<VulnerableSoftware> getVulnerableSoftware() {
return vulnerableSoftware; return vulnerableSoftware;
} }
@@ -142,7 +144,7 @@ public class Vulnerability implements Serializable, Comparable<Vulnerability> {
* *
* @param vulnerableSoftware new value of vulnerableSoftware * @param vulnerableSoftware new value of vulnerableSoftware
*/ */
public void setVulnerableSoftware(Set<VulnerableSoftware> vulnerableSoftware) { public void setVulnerableSoftware(SortedSet<VulnerableSoftware> vulnerableSoftware) {
this.vulnerableSoftware = vulnerableSoftware; this.vulnerableSoftware = vulnerableSoftware;
} }