Skip to content

Commit

Permalink
Resolves mojohaus#858: Replacing parallelStream() with stream() where…
Browse files Browse the repository at this point in the history
… it mutates a non-thread safe collection
  • Loading branch information
jarmoniuk committed Dec 16, 2022
1 parent 23c225f commit e379a6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -1356,7 +1356,7 @@ private static Map<File, Model> getChildModels(Model model, Log logger) throws I

File baseDir = model.getPomFile().getParentFile();

getAllChildModules(model, logger).parallelStream()
getAllChildModules(model, logger).stream()
.map(moduleName -> new File(baseDir, moduleName))
.map(file -> file.isFile() ? file : new File(file, "pom.xml"))
.filter(File::exists)
Expand Down
Expand Up @@ -367,7 +367,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
}

if ("always".equals(updateBuildOutputTimestampPolicy)) {
reactor.values().parallelStream()
reactor.values().stream()
.map(m -> PomHelper.getModelEntry(reactor, PomHelper.getGroupId(m), PomHelper.getArtifactId(m)))
.filter(Objects::nonNull)
.map(Map.Entry::getValue)
Expand Down

0 comments on commit e379a6b

Please sign in to comment.