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

Former-commit-id: ae1d42bbf2ccb5994cb793872ff228c8ca9fbd86
This commit is contained in:
Jeremy Long
2013-04-18 05:50:17 -04:00
parent 8fcd800aff
commit a3012a29c2
2 changed files with 6 additions and 4 deletions

View File

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

View File

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