Merge pull request #28162 from dreis2211
* pr/28162: Avoid explicit initialization of Atomics with their default values Closes gh-28162
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user