Avoid explicit initialization of Atomics with their default values
See gh-28162
This commit is contained in:
parent
f1c1a4fc8b
commit
c5088a3bd3
|
|
@ -157,7 +157,7 @@ class MetricsRestTemplateCustomizerTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void whenAutoTimingIsDisabledUriTemplateHandlerDoesNotCaptureUris() {
|
void whenAutoTimingIsDisabledUriTemplateHandlerDoesNotCaptureUris() {
|
||||||
AtomicBoolean enabled = new AtomicBoolean(false);
|
AtomicBoolean enabled = new AtomicBoolean();
|
||||||
AutoTimer autoTimer = new AutoTimer() {
|
AutoTimer autoTimer = new AutoTimer() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ class MetricsWebFilterTests {
|
||||||
|
|
||||||
class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider {
|
class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider {
|
||||||
|
|
||||||
private final AtomicBoolean fail = new AtomicBoolean(false);
|
private final AtomicBoolean fail = new AtomicBoolean();
|
||||||
|
|
||||||
FaultyWebFluxTagsProvider() {
|
FaultyWebFluxTagsProvider() {
|
||||||
super(true);
|
super(true);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ import io.micrometer.core.instrument.Tag;
|
||||||
*/
|
*/
|
||||||
class FaultyWebMvcTagsProvider extends DefaultWebMvcTagsProvider {
|
class FaultyWebMvcTagsProvider extends DefaultWebMvcTagsProvider {
|
||||||
|
|
||||||
private final AtomicBoolean fail = new AtomicBoolean(false);
|
private final AtomicBoolean fail = new AtomicBoolean();
|
||||||
|
|
||||||
FaultyWebMvcTagsProvider() {
|
FaultyWebMvcTagsProvider() {
|
||||||
super(true);
|
super(true);
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class SpringApplicationShutdownHook implements Runnable {
|
||||||
|
|
||||||
private final ApplicationContextClosedListener contextCloseListener = new ApplicationContextClosedListener();
|
private final ApplicationContextClosedListener contextCloseListener = new ApplicationContextClosedListener();
|
||||||
|
|
||||||
private final AtomicBoolean shutdownHookAdded = new AtomicBoolean(false);
|
private final AtomicBoolean shutdownHookAdded = new AtomicBoolean();
|
||||||
|
|
||||||
private boolean inProgress;
|
private boolean inProgress;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue