mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-25 08:19:01 +00:00
Nullability fixes for AtomicReference variables
Closes gh-35514 Signed-off-by: Manu Sridharan <msridhar@gmail.com>
This commit is contained in:
committed by
Sébastien Deleuze
parent
051adf267f
commit
e834a3a80c
@@ -135,7 +135,7 @@ final class OutputStreamPublisher<T> implements Flow.Publisher<T> {
|
||||
|
||||
private final AtomicLong requested = new AtomicLong();
|
||||
|
||||
private final AtomicReference<Object> parkedThread = new AtomicReference<>();
|
||||
private final AtomicReference<@Nullable Object> parkedThread = new AtomicReference<>();
|
||||
|
||||
private volatile @Nullable Throwable error;
|
||||
|
||||
|
||||
+3
-2
@@ -20,6 +20,7 @@ import java.io.IOException;
|
||||
import java.io.UncheckedIOException;
|
||||
import java.net.URI;
|
||||
import java.time.Duration;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
@@ -131,13 +132,13 @@ final class ReactorClientHttpRequest extends AbstractStreamingClientHttpRequest
|
||||
return Mono.empty();
|
||||
}
|
||||
|
||||
AtomicReference<Executor> executorRef = new AtomicReference<>();
|
||||
AtomicReference<@Nullable Executor> executorRef = new AtomicReference<>();
|
||||
|
||||
return outbound
|
||||
.withConnection(connection -> executorRef.set(connection.channel().eventLoop()))
|
||||
.send(FlowAdapters.toPublisher(new OutputStreamPublisher<>(
|
||||
os -> body.writeTo(StreamUtils.nonClosing(os)), new ByteBufMapper(outbound),
|
||||
executorRef.getAndSet(null), null)));
|
||||
Objects.requireNonNull(executorRef.getAndSet(null)), null)));
|
||||
}
|
||||
|
||||
static IOException convertException(RuntimeException ex) {
|
||||
|
||||
@@ -81,7 +81,7 @@ final class SubscriberInputStream<T> extends InputStream implements Flow.Subscri
|
||||
|
||||
private final Queue<T> queue;
|
||||
|
||||
private final AtomicReference<Object> parkedThread = new AtomicReference<>();
|
||||
private final AtomicReference<@Nullable Object> parkedThread = new AtomicReference<>();
|
||||
|
||||
private final AtomicInteger workAmount = new AtomicInteger();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user