mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 01:51:49 +01:00
fix index out of range exception per issue #611
This commit is contained in:
@@ -734,11 +734,11 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
}
|
}
|
||||||
} else if ("build-id".equals(key)) {
|
} else if ("build-id".equals(key)) {
|
||||||
int pos = value.indexOf('(');
|
int pos = value.indexOf('(');
|
||||||
if (pos >= 0) {
|
if (pos > 0) {
|
||||||
value = value.substring(0, pos - 1);
|
value = value.substring(0, pos - 1);
|
||||||
}
|
}
|
||||||
pos = value.indexOf('[');
|
pos = value.indexOf('[');
|
||||||
if (pos >= 0) {
|
if (pos > 0 ) {
|
||||||
value = value.substring(0, pos - 1);
|
value = value.substring(0, pos - 1);
|
||||||
}
|
}
|
||||||
versionEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
|
versionEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
|
||||||
|
|||||||
Reference in New Issue
Block a user