Skip to content

Commit

Permalink
Refactor stream to remove extra resolution
Browse files Browse the repository at this point in the history
Co-authored-by: Hannes Wellmann <[email protected]>
  • Loading branch information
kysmith-csg and HannesWell authored Nov 15, 2023
1 parent 956df0f commit 38e8167
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
.flatMap(tpFile -> tpFile.getLocations().stream())
.filter(InstallableUnitLocation.class::isInstance).map(InstallableUnitLocation.class::cast)
.flatMap(iu -> iu.getRepositories().stream())
.filter(iuRepo -> autoReferencesFilter.test(varResolver.resolve(iuRepo.getLocation())))
.map(iuRepo -> new RepositoryReference(null, varResolver.resolve(iuRepo.getLocation()),
true))
.map(iuRepo -> varResolver.resolve(iuRepo.getLocation())).filter(autoReferencesFilter)
.map(location -> new RepositoryReference(null, location, true))
.forEach(autoRepositoryRefeferences::add);
}
DestinationRepositoryDescriptor destinationRepoDescriptor = new DestinationRepositoryDescriptor(
Expand Down

0 comments on commit 38e8167

Please sign in to comment.