Skip to content

Commit

Permalink
fix: fix NPE (#6778)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Jul 4, 2024
1 parent 9fbb996 commit 3f0ffa9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ public String getEcosystem(DefCveItem cve) {
* <code>null</code>
*/
private boolean hasMultipleVendorProductConfigurations(DefCveItem cve) {
if (cve.getCve().getConfigurations() != null) {
if (cve.getCve().getConfigurations() != null && !cve.getCve().getConfigurations().isEmpty()) {
final List<CpeMatch> cpeEntries = cve.getCve().getConfigurations().stream()
.map(Config::getNodes)
.flatMap(List::stream)
.filter(cpe -> cpe.getCpeMatch() != null)
.map(Node::getCpeMatch)
.flatMap(List::stream)
.filter(match -> match.getCriteria() != null)
Expand Down

0 comments on commit 3f0ffa9

Please sign in to comment.