mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-25 10:32:00 +01:00
fixed bug 24 - short package names are no longer added as evvidence
Former-commit-id: 01bb31d35e58b624c31918f4a48fa2e5f584a8c5
This commit is contained in:
@@ -515,7 +515,7 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
if (ratio > 0.5) {
|
if (ratio > 0.5) {
|
||||||
//TODO remove weighting
|
//TODO remove weighting
|
||||||
vendor.addWeighting(entry.getKey());
|
vendor.addWeighting(entry.getKey());
|
||||||
if (addPackagesAsEvidence) {
|
if (addPackagesAsEvidence && entry.getKey().length() > 1) {
|
||||||
vendor.addEvidence("jar", "package", entry.getKey(), Evidence.Confidence.LOW);
|
vendor.addEvidence("jar", "package", entry.getKey(), Evidence.Confidence.LOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -524,7 +524,7 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
final float ratio = entry.getValue() / (float) classCount;
|
final float ratio = entry.getValue() / (float) classCount;
|
||||||
if (ratio > 0.5) {
|
if (ratio > 0.5) {
|
||||||
product.addWeighting(entry.getKey());
|
product.addWeighting(entry.getKey());
|
||||||
if (addPackagesAsEvidence) {
|
if (addPackagesAsEvidence && entry.getKey().length() > 1) {
|
||||||
product.addEvidence("jar", "package", entry.getKey(), Evidence.Confidence.LOW);
|
product.addEvidence("jar", "package", entry.getKey(), Evidence.Confidence.LOW);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user