Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
murdos committed Jan 20, 2024
1 parent 3a7d814 commit 6730f26
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,8 @@ private static <C extends AddMavenPlugin> Function<MavenPlugin, C> toAddMavenPlu
.stream()
.flatMap(toDependencyVersion(versions, projectDependencies))
.forEach(commandBuilder::addDependencyVersion);
return plugin
.versionSlug()
.map(versions::get)
.map(commandBuilder::pluginVersion)
.map(AddMavenPluginOptionalBuilder::build)
.orElse(commandBuilder.build());
plugin.versionSlug().map(versions::get).ifPresent(commandBuilder::pluginVersion);
return commandBuilder.build();
};
}

Expand Down

0 comments on commit 6730f26

Please sign in to comment.