Skip to content

Commit

Permalink
Flip equals to prevent NPE for nullable plugin.groupId
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Feb 26, 2024
1 parent 52454c4 commit 4c176e2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ && matchesGlob(d.getArtifactId(), exceptedArtifactId)) {
}

@Nullable
private static String getManagedPluginVersion(ResolvedPom resolvedPom, String groupId, String artifactId) {
private static String getManagedPluginVersion(ResolvedPom resolvedPom, @Nullable String groupId, String artifactId) {
for (Plugin p : resolvedPom.getPluginManagement()) {
if (groupId.equals(p.getGroupId()) && artifactId.equals(p.getArtifactId())) {
if (p.getGroupId().equals(groupId) && p.getArtifactId().equals(artifactId)) {
return resolvedPom.getValue(p.getVersion());
}
}
Expand Down

0 comments on commit 4c176e2

Please sign in to comment.