added build-id to specific items in the manifest to patch dependencies like batli-util.jar in issue #34

Former-commit-id: 0a6727676c5fa63a32fa7d4be18859ca622bad24
This commit is contained in:
Jeremy Long
2014-02-08 22:37:11 -05:00
parent 96bb9a2f8e
commit f268a48a16

View File

@@ -768,7 +768,16 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
} else {
versionEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
}
} else if (key.equals("build-id")) {
int pos = value.indexOf('(');
if (pos >= 0) {
value = value.substring(0, pos - 1);
}
pos = value.indexOf('[');
if (pos >= 0) {
value = value.substring(0, pos - 1);
}
versionEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
} else if (key.contains("title")) {
productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
addMatchingValues(classInformation, value, productEvidence);