mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-24 18:11:47 +01:00
fix possible NPE
This commit is contained in:
@@ -254,7 +254,7 @@ public class CPEAnalyzer extends AbstractAnalyzer {
|
|||||||
@SuppressWarnings("null")
|
@SuppressWarnings("null")
|
||||||
protected String addEvidenceWithoutDuplicateTerms(final String text, final Iterable<Evidence> evidence) {
|
protected String addEvidenceWithoutDuplicateTerms(final String text, final Iterable<Evidence> evidence) {
|
||||||
final String txt = (text == null) ? "" : text;
|
final String txt = (text == null) ? "" : text;
|
||||||
final StringBuilder sb = new StringBuilder(text.length() * 2);
|
final StringBuilder sb = new StringBuilder(txt.length() * 2);
|
||||||
sb.append(' ').append(txt).append(' ');
|
sb.append(' ').append(txt).append(' ');
|
||||||
for (Evidence e : evidence) {
|
for (Evidence e : evidence) {
|
||||||
String value = e.getValue();
|
String value = e.getValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user