pull/35733/head
Moritz Halbritter 1 year ago
parent 8cc428c0b5
commit ebbb4d319d

@ -16,8 +16,6 @@
package org.springframework.boot.actuate.web.exchanges;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
@ -59,7 +57,7 @@ public class InMemoryHttpExchangeRepository implements HttpExchangeRepository {
@Override
public List<HttpExchange> findAll() {
synchronized (this.httpExchanges) {
return Collections.unmodifiableList(new ArrayList<>(this.httpExchanges));
return List.copyOf(this.httpExchanges);
}
}

@ -36,7 +36,7 @@ import org.springframework.context.ConfigurableApplicationContext;
public class TestcontainersLifecycleApplicationContextInitializer
implements ApplicationContextInitializer<ConfigurableApplicationContext> {
private static Set<ConfigurableApplicationContext> applied = Collections.newSetFromMap(new WeakHashMap<>());
private static final Set<ConfigurableApplicationContext> applied = Collections.newSetFromMap(new WeakHashMap<>());
@Override
public void initialize(ConfigurableApplicationContext applicationContext) {

Loading…
Cancel
Save