mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 03:13:21 +08:00
Polish
This commit is contained in:
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…
Reference in New Issue
Block a user