Don't initialize AtomicReference to its default value.
This commit is contained in:
parent
4dd7cefbde
commit
b6ae693fe5
|
@ -120,7 +120,7 @@ class DefaultAsyncCacheRevalidator extends CacheRevalidatorBase {
|
|||
final RevalidationCall call) {
|
||||
scheduleRevalidation(cacheKey, () -> call.execute(new AsyncExecCallback() {
|
||||
|
||||
private final AtomicReference<HttpResponse> responseRef = new AtomicReference<>(null);
|
||||
private final AtomicReference<HttpResponse> responseRef = new AtomicReference<>();
|
||||
|
||||
@Override
|
||||
public AsyncDataConsumer handleResponse(
|
||||
|
|
|
@ -61,7 +61,7 @@ public class AsyncEchoHandler implements AsyncServerExchangeHandler {
|
|||
|
||||
public AsyncEchoHandler() {
|
||||
this.entityConsumer = new BasicAsyncEntityConsumer();
|
||||
this.entityProducerRef = new AtomicReference<>(null);
|
||||
this.entityProducerRef = new AtomicReference<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,7 +63,7 @@ public class AsyncRandomHandler implements AsyncServerExchangeHandler {
|
|||
private final AtomicReference<AsyncEntityProducer> entityProducerRef;
|
||||
|
||||
public AsyncRandomHandler() {
|
||||
this.entityProducerRef = new AtomicReference<>(null);
|
||||
this.entityProducerRef = new AtomicReference<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -65,7 +65,7 @@ public class AuthenticatingAsyncDecorator implements AsyncServerExchangeHandler
|
|||
public AuthenticatingAsyncDecorator(final AsyncServerExchangeHandler exchangeHandler, final Authenticator authenticator) {
|
||||
this.exchangeHandler = Args.notNull(exchangeHandler, "Request handler");
|
||||
this.authenticator = Args.notNull(authenticator, "Authenticator");
|
||||
this.responseProducerRef = new AtomicReference<>(null);
|
||||
this.responseProducerRef = new AtomicReference<>();
|
||||
this.authTokenExtractor = new BasicAuthTokenExtractor();
|
||||
}
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ public abstract class AbstractHttpReactiveFundamentalsTest<T extends CloseableHt
|
|||
while (testCases.size() < numTestCases) {
|
||||
final long seed = 198723L * testCaseNum++;
|
||||
final int length = 1 + new Random(seed).nextInt(maxSize);
|
||||
final AtomicReference<String> expectedHash = new AtomicReference<>(null);
|
||||
final AtomicReference<String> expectedHash = new AtomicReference<>();
|
||||
final Flowable<ByteBuffer> stream = ReactiveTestUtils.produceStream(length, expectedHash);
|
||||
final StreamingTestCase streamingTestCase = new StreamingTestCase(length, expectedHash, stream);
|
||||
testCases.put((long) length, streamingTestCase);
|
||||
|
|
|
@ -88,7 +88,7 @@ public class H2AsyncMainClientExec implements AsyncExecChainHandler {
|
|||
|
||||
final AsyncClientExchangeHandler internalExchangeHandler = new AsyncClientExchangeHandler() {
|
||||
|
||||
private final AtomicReference<AsyncDataConsumer> entityConsumerRef = new AtomicReference<>(null);
|
||||
private final AtomicReference<AsyncDataConsumer> entityConsumerRef = new AtomicReference<>();
|
||||
|
||||
@Override
|
||||
public void releaseResources() {
|
||||
|
|
|
@ -104,7 +104,7 @@ class HttpAsyncMainClientExec implements AsyncExecChainHandler {
|
|||
final AtomicInteger messageCountDown = new AtomicInteger(2);
|
||||
final AsyncClientExchangeHandler internalExchangeHandler = new AsyncClientExchangeHandler() {
|
||||
|
||||
private final AtomicReference<AsyncDataConsumer> entityConsumerRef = new AtomicReference<>(null);
|
||||
private final AtomicReference<AsyncDataConsumer> entityConsumerRef = new AtomicReference<>();
|
||||
|
||||
@Override
|
||||
public void releaseResources() {
|
||||
|
|
|
@ -68,7 +68,7 @@ class InternalH2AsyncExecRuntime implements AsyncExecRuntime {
|
|||
this.log = log;
|
||||
this.connPool = connPool;
|
||||
this.pushHandlerFactory = pushHandlerFactory;
|
||||
this.sessionRef = new AtomicReference<>(null);
|
||||
this.sessionRef = new AtomicReference<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -75,7 +75,7 @@ class InternalHttpAsyncExecRuntime implements AsyncExecRuntime {
|
|||
this.connectionInitiator = connectionInitiator;
|
||||
this.pushHandlerFactory = pushHandlerFactory;
|
||||
this.versionPolicy = versionPolicy;
|
||||
this.endpointRef = new AtomicReference<>(null);
|
||||
this.endpointRef = new AtomicReference<>();
|
||||
this.validDuration = TimeValue.NEG_ONE_MILLISECOND;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ class InternalExecRuntime implements ExecRuntime, Cancellable {
|
|||
this.manager = manager;
|
||||
this.requestExecutor = requestExecutor;
|
||||
this.cancellableDependency = cancellableDependency;
|
||||
this.endpointRef = new AtomicReference<>(null);
|
||||
this.endpointRef = new AtomicReference<>();
|
||||
this.validDuration = TimeValue.NEG_ONE_MILLISECOND;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue