Skip to content

Commit

Permalink
Prevent NPE in ApiBaseline.getApiComponent(String, Version)
Browse files Browse the repository at this point in the history
- Guard against fAllComponentsById.get(id) yielding null.

#1569
  • Loading branch information
merks authored and laeubi committed Jan 17, 2025
1 parent 5d46304 commit 5aa112a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,9 @@ public IApiComponent getApiComponent(String id, Version version) {
return component;
}
Set<IApiComponent> allComponents = fAllComponentsById.get(id);
if (allComponents == null) {
return null;
}
return allComponents.stream().filter(c -> hasSameMMMVersion(version, c)).findFirst().orElse(null);
}

Expand Down

0 comments on commit 5aa112a

Please sign in to comment.