Skip to content

Commit 561526f

Browse files
committed
Merge branch 'gh-30844' into 2.5.x
Closes gh-30844
2 parents e08483f + 798d61f commit 561526f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/classpath/ClassPathFileSystemWatcherTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2021 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
2323
import java.util.HashMap;
2424
import java.util.List;
2525
import java.util.Map;
26+
import java.util.concurrent.CopyOnWriteArrayList;
2627

2728
import org.junit.jupiter.api.Test;
2829
import org.junit.jupiter.api.io.TempDir;
@@ -116,7 +117,7 @@ Listener listener() {
116117

117118
static class Listener implements ApplicationListener<ClassPathChangedEvent> {
118119

119-
private List<ClassPathChangedEvent> events = new ArrayList<>();
120+
private List<ClassPathChangedEvent> events = new CopyOnWriteArrayList<>();
120121

121122
@Override
122123
public void onApplicationEvent(ClassPathChangedEvent event) {

0 commit comments

Comments
 (0)