Skip to content

Commit

Permalink
Use method reference and remove redundant types
Browse files Browse the repository at this point in the history
in BndMavenLifecycleParticipant
  • Loading branch information
akurtakov committed Aug 8, 2023
1 parent 530436e commit f6a96a3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void afterProjectsRead(MavenSession session) throws MavenExecutionExcepti
Map<MavenProject, Project> bndProjects = getProjects(session);
Map<String, MavenProject> manifestFirstProjects = getManifestFirstProjects(session, bndProjects.keySet());
Map<String, MavenProject> bndWorkspaceProjects = bndProjects.entrySet().stream()
.collect(Collectors.toMap(e -> e.getValue().getName(), e -> e.getKey(), (a, b) -> {
.collect(Collectors.toMap(e -> e.getValue().getName(), Entry<MavenProject, Project>::getKey, (a, b) -> {
logger.warn(
"Your reactor build contains duplicate BND projects from different workspace, build order might be insufficient!");
logger.warn("\tProject 1 (selected): " + a.getBasedir());
Expand Down Expand Up @@ -166,8 +166,8 @@ private Map<String, MavenProject> getManifestFirstProjects(MavenSession session,
}

private Map<MavenProject, Project> getProjects(MavenSession session) {
Set<Workspace> workspaces = new HashSet<Workspace>();
HashMap<MavenProject, Project> result = new HashMap<MavenProject, Project>();
Set<Workspace> workspaces = new HashSet<>();
HashMap<MavenProject, Project> result = new HashMap<>();
for (MavenProject mavenProject : session.getProjects()) {
if (isBNDProject(mavenProject)) {
try {
Expand Down

0 comments on commit f6a96a3

Please sign in to comment.