Skip to content

Commit

Permalink
Fix npe in mvn3 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cstamas committed Mar 11, 2024
1 parent 052398d commit 67d36ba
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ private JavaResolutionScope(
this.id = requireNonNull(id, "id");
this.javaLanguage = requireNonNull(javaLanguage, "javaLanguage");
this.mode = requireNonNull(mode, "mode");
// need to filter for null elements, as MavenLevel may add null elements
this.directlyIncluded = Collections.unmodifiableSet(
directlyIncluded.stream().filter(Objects::nonNull).collect(Collectors.toSet()));
// need to filter for null elements, as MavenLevel may add null elements
this.transitivelyExcluded = Collections.unmodifiableSet(
transitivelyExcluded.stream().filter(Objects::nonNull).collect(Collectors.toSet()));
}
Expand Down

0 comments on commit 67d36ba

Please sign in to comment.