Skip to content

Commit f036132

Browse files
authored
bugfix job metrics set concurrent modification exception (apache#723)
1 parent a3f34c2 commit f036132

File tree

1 file changed

+1
-1
lines changed
  • common/src/main/java/com/usthe/common/entity/job

1 file changed

+1
-1
lines changed

common/src/main/java/com/usthe/common/entity/job/Job.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public synchronized void constructPriorMetrics() {
167167
// 构造指标组任务执行顺序链表
168168
priorMetrics = new LinkedList<>();
169169
map.values().forEach(metric -> {
170-
Set<Metrics> metricsSet = new HashSet<>(metric);
170+
Set<Metrics> metricsSet = Collections.synchronizedSet(new HashSet<>(metric));
171171
priorMetrics.add(metricsSet);
172172
});
173173
priorMetrics.sort(Comparator.comparing(e -> {

0 commit comments

Comments
 (0)