mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-20 08:14:44 +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.
|
* Adds an entry for vulnerable software.
|
||||||
*
|
*
|
||||||
* @param cpe string representation of a CPE entry
|
* @param cpe string representation of a CPE entry
|
||||||
* @return if the add succeeded
|
|
||||||
*/
|
*/
|
||||||
public boolean addVulnerableSoftware(String cpe) {
|
public void addVulnerableSoftware(String cpe) {
|
||||||
return addVulnerableSoftware(cpe, null);
|
addVulnerableSoftware(cpe, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -206,28 +205,26 @@ public class Vulnerability implements Serializable, Comparable<Vulnerability> {
|
|||||||
* @param cpe string representation of a cpe
|
* @param cpe string representation of a cpe
|
||||||
* @param previousVersion the previous version (previousVersion - cpe would
|
* @param previousVersion the previous version (previousVersion - cpe would
|
||||||
* be considered vulnerable)
|
* 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();
|
final VulnerableSoftware vs = new VulnerableSoftware();
|
||||||
vs.setCpe(cpe);
|
vs.setCpe(cpe);
|
||||||
if (previousVersion != null) {
|
if (previousVersion != null) {
|
||||||
vs.setPreviousVersion(previousVersion);
|
vs.setPreviousVersion(previousVersion);
|
||||||
}
|
}
|
||||||
return updateVulnerableSoftware(vs);
|
updateVulnerableSoftware(vs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds or updates a vulnerable software entry.
|
* Adds or updates a vulnerable software entry.
|
||||||
*
|
*
|
||||||
* @param vulnSoftware the vulnerable software
|
* @param vulnSoftware the vulnerable software
|
||||||
* @return if the update succeeded
|
|
||||||
*/
|
*/
|
||||||
public boolean updateVulnerableSoftware(VulnerableSoftware vulnSoftware) {
|
public void updateVulnerableSoftware(VulnerableSoftware vulnSoftware) {
|
||||||
if (vulnerableSoftware.contains(vulnSoftware)) {
|
if (vulnerableSoftware.contains(vulnSoftware)) {
|
||||||
vulnerableSoftware.remove(vulnSoftware);
|
vulnerableSoftware.remove(vulnSoftware);
|
||||||
}
|
}
|
||||||
return vulnerableSoftware.add(vulnSoftware);
|
vulnerableSoftware.add(vulnSoftware);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user