mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
This commit is contained in:
parent
8cc428c0b5
commit
ebbb4d319d
@ -16,8 +16,6 @@
|
|||||||
|
|
||||||
package org.springframework.boot.actuate.web.exchanges;
|
package org.springframework.boot.actuate.web.exchanges;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -59,7 +57,7 @@ public class InMemoryHttpExchangeRepository implements HttpExchangeRepository {
|
|||||||
@Override
|
@Override
|
||||||
public List<HttpExchange> findAll() {
|
public List<HttpExchange> findAll() {
|
||||||
synchronized (this.httpExchanges) {
|
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
|
public class TestcontainersLifecycleApplicationContextInitializer
|
||||||
implements ApplicationContextInitializer<ConfigurableApplicationContext> {
|
implements ApplicationContextInitializer<ConfigurableApplicationContext> {
|
||||||
|
|
||||||
private static Set<ConfigurableApplicationContext> applied = Collections.newSetFromMap(new WeakHashMap<>());
|
private static final Set<ConfigurableApplicationContext> applied = Collections.newSetFromMap(new WeakHashMap<>());
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(ConfigurableApplicationContext applicationContext) {
|
public void initialize(ConfigurableApplicationContext applicationContext) {
|
||||||
|
Loading…
Reference in New Issue
Block a user