mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 08:13:43 +01:00
cleanup: remove unused return value
This commit is contained in:
@@ -194,10 +194,9 @@ public class Vulnerability implements Serializable, Comparable<Vulnerability> {
|
||||
* Adds an entry for vulnerable software.
|
||||
*
|
||||
* @param cpe string representation of a CPE entry
|
||||
* @return if the add succeeded
|
||||
*/
|
||||
public boolean addVulnerableSoftware(String cpe) {
|
||||
return addVulnerableSoftware(cpe, null);
|
||||
public void addVulnerableSoftware(String cpe) {
|
||||
addVulnerableSoftware(cpe, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,28 +205,26 @@ public class Vulnerability implements Serializable, Comparable<Vulnerability> {
|
||||
* @param cpe string representation of a cpe
|
||||
* @param previousVersion the previous version (previousVersion - cpe would
|
||||
* be considered vulnerable)
|
||||
* @return if the add succeeded
|
||||
*/
|
||||
public boolean addVulnerableSoftware(String cpe, String previousVersion) {
|
||||
public void addVulnerableSoftware(String cpe, String previousVersion) {
|
||||
final VulnerableSoftware vs = new VulnerableSoftware();
|
||||
vs.setCpe(cpe);
|
||||
if (previousVersion != null) {
|
||||
vs.setPreviousVersion(previousVersion);
|
||||
}
|
||||
return updateVulnerableSoftware(vs);
|
||||
updateVulnerableSoftware(vs);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds or updates a vulnerable software entry.
|
||||
*
|
||||
* @param vulnSoftware the vulnerable software
|
||||
* @return if the update succeeded
|
||||
*/
|
||||
public boolean updateVulnerableSoftware(VulnerableSoftware vulnSoftware) {
|
||||
public void updateVulnerableSoftware(VulnerableSoftware vulnSoftware) {
|
||||
if (vulnerableSoftware.contains(vulnSoftware)) {
|
||||
vulnerableSoftware.remove(vulnSoftware);
|
||||
}
|
||||
return vulnerableSoftware.add(vulnSoftware);
|
||||
vulnerableSoftware.add(vulnSoftware);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user