Skip to content

Commit c5f7738

Browse files
committed
Copy contents of the scheduledJobIds
1 parent 54ac17c commit c5f7738

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/scheduler/SchedulerEngine.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.time.Clock;
1919
import java.util.Collection;
2020
import java.util.Collections;
21+
import java.util.HashSet;
2122
import java.util.List;
2223
import java.util.Map;
2324
import java.util.Objects;
@@ -139,7 +140,7 @@ public void stop() {
139140
}
140141

141142
public Set<String> scheduledJobIds() {
142-
return Collections.unmodifiableSet(schedules.keySet());
143+
return Collections.unmodifiableSet(new HashSet<>(schedules.keySet()));
143144
}
144145

145146
public void add(Job job) {

0 commit comments

Comments
 (0)