Polishing
Closes gh-31522
This commit is contained in:
@@ -62,7 +62,7 @@ public class CompositePropertySourceBenchmark {
|
||||
CompositePropertySource composite;
|
||||
|
||||
@Param({ "2", "5", "10" })
|
||||
int numberOfPropertySource;
|
||||
int numberOfPropertySources;
|
||||
|
||||
@Param({ "10", "100", "1000" })
|
||||
int numberOfPropertyNamesPerSource;
|
||||
@@ -70,7 +70,7 @@ public class CompositePropertySourceBenchmark {
|
||||
@Setup(Level.Trial)
|
||||
public void setUp() {
|
||||
this.composite = new CompositePropertySource("benchmark");
|
||||
for (int i = 0; i < this.numberOfPropertySource; i++) {
|
||||
for (int i = 0; i < this.numberOfPropertySources; i++) {
|
||||
Map<String, Object> map = new HashMap<>(this.numberOfPropertyNamesPerSource);
|
||||
for (int j = 0; j < this.numberOfPropertyNamesPerSource; j++) {
|
||||
map.put(ID_GENERATOR.generateId().toString(), VALUE);
|
||||
|
||||
@@ -54,7 +54,7 @@ final class OutputStreamPublisher implements Publisher<DataBuffer> {
|
||||
private final int chunkSize;
|
||||
|
||||
|
||||
public OutputStreamPublisher(Consumer<OutputStream> outputStreamConsumer, DataBufferFactory bufferFactory,
|
||||
OutputStreamPublisher(Consumer<OutputStream> outputStreamConsumer, DataBufferFactory bufferFactory,
|
||||
Executor executor, int chunkSize) {
|
||||
|
||||
this.outputStreamConsumer = outputStreamConsumer;
|
||||
@@ -99,7 +99,7 @@ final class OutputStreamPublisher implements Publisher<DataBuffer> {
|
||||
private long produced;
|
||||
|
||||
|
||||
public OutputStreamSubscription(Subscriber<? super DataBuffer> actual,
|
||||
OutputStreamSubscription(Subscriber<? super DataBuffer> actual,
|
||||
Consumer<OutputStream> outputStreamConsumer, DataBufferFactory bufferFactory, int chunkSize) {
|
||||
|
||||
this.actual = actual;
|
||||
|
||||
@@ -22,7 +22,7 @@ import io.micrometer.context.ContextSnapshotFactory;
|
||||
import org.springframework.core.task.TaskDecorator;
|
||||
|
||||
/**
|
||||
* {@link TaskDecorator} that {@link ContextSnapshot#wrap(Runnable) wrap the execution} of
|
||||
* {@link TaskDecorator} that {@link ContextSnapshot#wrap(Runnable) wraps the execution} of
|
||||
* tasks, assisting with context propagation.
|
||||
* <p>This operation is only useful when the task execution is scheduled on a different
|
||||
* thread than the original call stack; this depends on the choice of
|
||||
|
||||
@@ -49,7 +49,7 @@ public class SingletonSupplier<T> implements Supplier<T> {
|
||||
private volatile T singletonInstance;
|
||||
|
||||
/**
|
||||
* Guards access to write operations on the response.
|
||||
* Guards access to write operations on the {@code singletonInstance} field.
|
||||
*/
|
||||
private final Lock writeLock = new ReentrantLock();
|
||||
|
||||
|
||||
@@ -52,15 +52,15 @@ class ContextPropagatingTaskDecoratorTests {
|
||||
|
||||
private static final ThreadLocal<String> holder = new ThreadLocal<>();
|
||||
|
||||
public static void setValue(String value) {
|
||||
static void setValue(String value) {
|
||||
holder.set(value);
|
||||
}
|
||||
|
||||
public static String getValue() {
|
||||
static String getValue() {
|
||||
return holder.get();
|
||||
}
|
||||
|
||||
public static void reset() {
|
||||
static void reset() {
|
||||
holder.remove();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class ContextPropagatingTaskDecoratorTests {
|
||||
|
||||
static class TestThreadLocalAccessor implements ThreadLocalAccessor<String> {
|
||||
|
||||
public static final String KEY = "test.threadlocal";
|
||||
static final String KEY = "test.threadlocal";
|
||||
|
||||
@Override
|
||||
public Object key() {
|
||||
|
||||
Reference in New Issue
Block a user