Skip to content

Commit

Permalink
Fix NullPointerException when fetching findings
Browse files Browse the repository at this point in the history
Fixes #4351

Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Nov 12, 2024
1 parent ba4400e commit 3407078
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ public List<Finding> getFindings(Project project, boolean includeSuppressed) {
.forEach(metaComponent -> {
final var search = new RepositoryMetaComponentSearch(metaComponent.getRepositoryType(), metaComponent.getNamespace(), metaComponent.getName());
final List<Finding> affectedFindings = findingsByMetaComponentSearch.get(search);
for (final Finding finding : affectedFindings) {
finding.getComponent().put("latestVersion", metaComponent.getLatestVersion());
if (affectedFindings != null) {
for (final Finding finding : affectedFindings) {
finding.getComponent().put("latestVersion", metaComponent.getLatestVersion());
}
}
});

Expand Down

0 comments on commit 3407078

Please sign in to comment.