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
|
||||
void whenAutoTimingIsDisabledUriTemplateHandlerDoesNotCaptureUris() {
|
||||
AtomicBoolean enabled = new AtomicBoolean(false);
|
||||
AtomicBoolean enabled = new AtomicBoolean();
|
||||
AutoTimer autoTimer = new AutoTimer() {
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ class MetricsWebFilterTests {
|
|||
|
||||
class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider {
|
||||
|
||||
private final AtomicBoolean fail = new AtomicBoolean(false);
|
||||
private final AtomicBoolean fail = new AtomicBoolean();
|
||||
|
||||
FaultyWebFluxTagsProvider() {
|
||||
super(true);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import io.micrometer.core.instrument.Tag;
|
|||
*/
|
||||
class FaultyWebMvcTagsProvider extends DefaultWebMvcTagsProvider {
|
||||
|
||||
private final AtomicBoolean fail = new AtomicBoolean(false);
|
||||
private final AtomicBoolean fail = new AtomicBoolean();
|
||||
|
||||
FaultyWebMvcTagsProvider() {
|
||||
super(true);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class SpringApplicationShutdownHook implements Runnable {
|
|||
|
||||
private final ApplicationContextClosedListener contextCloseListener = new ApplicationContextClosedListener();
|
||||
|
||||
private final AtomicBoolean shutdownHookAdded = new AtomicBoolean(false);
|
||||
private final AtomicBoolean shutdownHookAdded = new AtomicBoolean();
|
||||
|
||||
private boolean inProgress;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue