mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 10:01:35 +01:00
minor formating update
This commit is contained in:
@@ -31,7 +31,6 @@ import org.owasp.dependencycheck.data.cpe.IndexEntry;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A record containing information about vulnerable software. This is referenced
|
* A record containing information about vulnerable software. This is referenced
|
||||||
* from a vulnerability.
|
* from a vulnerability.
|
||||||
@@ -194,10 +193,10 @@ public class VulnerableSoftware extends IndexEntry implements Serializable, Comp
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method that split versions for '.', '|' and '-".
|
* Method that split versions for '.', '|' and '-". Then if a token start
|
||||||
* Then if a token start with a number and then contains letters, it will split it too.
|
* with a number and then contains letters, it will split it too. For
|
||||||
* For example "12a" is splitted in ["12", "a"].
|
* example "12a" is splitted in ["12", "a"]. This is done to support correct
|
||||||
* This is done to support correct comparison of "5.0.3a", "5.0.9" and "5.0.30".
|
* comparison of "5.0.3a", "5.0.9" and "5.0.30".
|
||||||
*
|
*
|
||||||
* @return an Array of String containing the tokens to be compared
|
* @return an Array of String containing the tokens to be compared
|
||||||
*/
|
*/
|
||||||
@@ -216,14 +215,11 @@ public class VulnerableSoftware extends IndexEntry implements Serializable, Comp
|
|||||||
res.add(g1);
|
res.add(g1);
|
||||||
res.add(g2);
|
res.add(g2);
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
res.add(token);
|
|
||||||
}
|
}
|
||||||
|
res.add(token);
|
||||||
return res.toArray(new String[res.size()]);
|
|
||||||
}
|
}
|
||||||
|
return res.toArray(new String[res.size()]);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the comparable interface.
|
* Implementation of the comparable interface.
|
||||||
@@ -239,8 +235,8 @@ public class VulnerableSoftware extends IndexEntry implements Serializable, Comp
|
|||||||
final int max = (left.length <= right.length) ? left.length : right.length;
|
final int max = (left.length <= right.length) ? left.length : right.length;
|
||||||
if (max > 0) {
|
if (max > 0) {
|
||||||
for (int i = 0; result == 0 && i < max; i++) {
|
for (int i = 0; result == 0 && i < max; i++) {
|
||||||
final String[] subLeft = split(left[i]);
|
final String[] subLeft = split(left[i]);
|
||||||
final String[] subRight = split(right[i]);
|
final String[] subRight = split(right[i]);
|
||||||
final int subMax = (subLeft.length <= subRight.length) ? subLeft.length : subRight.length;
|
final int subMax = (subLeft.length <= subRight.length) ? subLeft.length : subRight.length;
|
||||||
if (subMax > 0) {
|
if (subMax > 0) {
|
||||||
for (int x = 0; result == 0 && x < subMax; x++) {
|
for (int x = 0; result == 0 && x < subMax; x++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user