Drop explicit zeroing at instantiation of Atomic* objects
This commit is contained in:
committed by
Juergen Hoeller
parent
b7e1553c9d
commit
8a04910bdd
@@ -61,7 +61,7 @@ public class ReactorResourceFactoryTests {
|
||||
@Test
|
||||
void globalResourcesWithConsumer() throws Exception {
|
||||
|
||||
AtomicBoolean invoked = new AtomicBoolean(false);
|
||||
AtomicBoolean invoked = new AtomicBoolean();
|
||||
|
||||
this.resourceFactory.addGlobalResourcesConsumer(httpResources -> invoked.set(true));
|
||||
this.resourceFactory.afterPropertiesSet();
|
||||
|
||||
@@ -75,7 +75,7 @@ public class ClientCodecConfigurerTests {
|
||||
|
||||
private final ClientCodecConfigurer configurer = new DefaultClientCodecConfigurer();
|
||||
|
||||
private final AtomicInteger index = new AtomicInteger(0);
|
||||
private final AtomicInteger index = new AtomicInteger();
|
||||
|
||||
|
||||
@Test
|
||||
|
||||
@@ -73,7 +73,7 @@ class CodecConfigurerTests {
|
||||
|
||||
private final CodecConfigurer configurer = new TestCodecConfigurer();
|
||||
|
||||
private final AtomicInteger index = new AtomicInteger(0);
|
||||
private final AtomicInteger index = new AtomicInteger();
|
||||
|
||||
|
||||
@Test
|
||||
@@ -374,7 +374,7 @@ class CodecConfigurerTests {
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
void withDefaultCodecConfig() {
|
||||
AtomicBoolean callbackCalled = new AtomicBoolean(false);
|
||||
AtomicBoolean callbackCalled = new AtomicBoolean();
|
||||
this.configurer.defaultCodecs().enableLoggingRequestDetails(true);
|
||||
this.configurer.customCodecs().withDefaultCodecConfig(config -> {
|
||||
assertThat(config.isEnableLoggingRequestDetails()).isTrue();
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ServerCodecConfigurerTests {
|
||||
|
||||
private final ServerCodecConfigurer configurer = new DefaultServerCodecConfigurer();
|
||||
|
||||
private final AtomicInteger index = new AtomicInteger(0);
|
||||
private final AtomicInteger index = new AtomicInteger();
|
||||
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -121,7 +121,7 @@ public class ContextPathCompositeHandlerTests {
|
||||
@Test // SPR-17144
|
||||
public void notFoundWithCommitAction() {
|
||||
|
||||
AtomicBoolean commitInvoked = new AtomicBoolean(false);
|
||||
AtomicBoolean commitInvoked = new AtomicBoolean();
|
||||
|
||||
ServerHttpRequest request = MockServerHttpRequest.get("/unknown/path").build();
|
||||
ServerHttpResponse response = new MockServerHttpResponse();
|
||||
|
||||
@@ -123,7 +123,7 @@ public class WebHttpHandlerBuilderTests {
|
||||
BiFunction<ServerHttpRequest, String, ServerHttpRequest> mutator =
|
||||
(req, value) -> req.mutate().headers(headers -> headers.add("My-Header", value)).build();
|
||||
|
||||
AtomicBoolean success = new AtomicBoolean(false);
|
||||
AtomicBoolean success = new AtomicBoolean();
|
||||
HttpHandler httpHandler = WebHttpHandlerBuilder
|
||||
.webHandler(exchange -> {
|
||||
HttpHeaders headers = exchange.getRequest().getHeaders();
|
||||
|
||||
Reference in New Issue
Block a user