Skip to content

Commit

Permalink
Fix NPE obtaining a project map from Maven session
Browse files Browse the repository at this point in the history
  • Loading branch information
aloubyansky committed Jan 26, 2023
1 parent aad2385 commit 85bcb2e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ static ArtifactKey getProjectId(MavenProject project) {

static Map<Path, Model> getProjectMap(MavenSession session) {
final List<MavenProject> allProjects = session.getAllProjects();
if (allProjects == null) {
return Map.of();
}
final Map<Path, Model> projectModels = new HashMap<>(allProjects.size());
for (MavenProject mp : allProjects) {
mp.getOriginalModel().setPomFile(mp.getFile());
Expand Down

0 comments on commit 85bcb2e

Please sign in to comment.