mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 00:59:34 +01:00
Replace raw Iterator with for each
This commit is contained in:
@@ -21,7 +21,6 @@ import java.io.Serializable;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.SortedSet;
|
import java.util.SortedSet;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains the information about a vulnerability.
|
* Contains the information about a vulnerability.
|
||||||
@@ -390,15 +389,15 @@ public class Vulnerability implements Serializable, Comparable<Vulnerability> {
|
|||||||
final StringBuilder sb = new StringBuilder("Vulnerability ");
|
final StringBuilder sb = new StringBuilder("Vulnerability ");
|
||||||
sb.append(this.name);
|
sb.append(this.name);
|
||||||
sb.append("\nReferences:\n");
|
sb.append("\nReferences:\n");
|
||||||
for (Iterator i = this.references.iterator(); i.hasNext();) {
|
for (Reference reference : this.references) {
|
||||||
sb.append("=> ");
|
sb.append("=> ");
|
||||||
sb.append(i.next());
|
sb.append(reference);
|
||||||
sb.append("\n");
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
sb.append("\nSoftware:\n");
|
sb.append("\nSoftware:\n");
|
||||||
for (Iterator i = this.vulnerableSoftware.iterator(); i.hasNext();) {
|
for (VulnerableSoftware software : this.vulnerableSoftware) {
|
||||||
sb.append("=> ");
|
sb.append("=> ");
|
||||||
sb.append(i.next());
|
sb.append(software);
|
||||||
sb.append("\n");
|
sb.append("\n");
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user