Skip to content

Commit

Permalink
Fix possible thread issue in azure task adder
Browse files Browse the repository at this point in the history
  • Loading branch information
wangmingliang-ms committed Nov 20, 2023
1 parent 9760e42 commit e5ad977
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public void runConfigurationAdded(@Nonnull RunnerAndConfigurationSettings settin
}
final List<Connection<?, ?>> connections = profile.getConnections();
synchronized (config.getBeforeRunTasks()) {
final List<BeforeRunTask<?>> tasks = config.getBeforeRunTasks().stream()
.filter(task -> task instanceof DotEnvBeforeRunTaskProvider.LoadDotEnvBeforeRunTask)
.collect(Collectors.toList());
final List<BeforeRunTask<?>> tasks = new ArrayList<>(config.getBeforeRunTasks().stream()
.filter(task -> task instanceof DotEnvBeforeRunTaskProvider.LoadDotEnvBeforeRunTask)
.toList());
if (connections.stream().anyMatch(c -> c.isApplicableFor(config))) {
tasks.add(new DotEnvBeforeRunTaskProvider.LoadDotEnvBeforeRunTask(config));
}
Expand Down

0 comments on commit e5ad977

Please sign in to comment.