mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 07:43:40 +01:00
StringBuilder allocation more precise.
This commit is contained in:
@@ -111,7 +111,10 @@ public class NvdCve12Handler extends DefaultHandler {
|
||||
/*yes yes, this may not actually be an "a" - it could be an OS, etc. but for our
|
||||
purposes this is good enough as we won't use this if we don't find a corresponding "a"
|
||||
in the nvd cve 2.0. */
|
||||
final StringBuilder cpe = new StringBuilder();
|
||||
final int cpeLen = 8 + vendor.length() + product.length()
|
||||
+ (null != num ? (1 + num.length()) : 0)
|
||||
+ (null != edition ? (1 + edition.length()) : 0);
|
||||
final StringBuilder cpe = new StringBuilder(cpeLen);
|
||||
cpe.append("cpe:/a:").append(vendor).append(':').append(product);
|
||||
if (num != null) {
|
||||
cpe.append(':').append(num);
|
||||
|
||||
Reference in New Issue
Block a user