Remove redundant assignment of default values to volatile/atomic fields

Closes gh-27477
This commit is contained in:
Сергей Цыпанов 2021-09-27 18:28:41 +03:00 committed by Brian Clozel
parent e8d24ae693
commit 8a87e118e1
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ import org.springframework.core.metrics.StartupStep;
*/
public class FlightRecorderApplicationStartup implements ApplicationStartup {
private final AtomicLong currentSequenceId = new AtomicLong(0);
private final AtomicLong currentSequenceId = new AtomicLong();
private final Deque<Long> currentSteps;

View File

@ -274,7 +274,7 @@ public final class SpelCompiler implements Opcodes {
private static final URL[] NO_URLS = new URL[0];
private final AtomicInteger classesDefinedCount = new AtomicInteger(0);
private final AtomicInteger classesDefinedCount = new AtomicInteger();
public ChildClassLoader(@Nullable ClassLoader classLoader) {
super(NO_URLS, classLoader);

View File

@ -42,7 +42,7 @@ class AnonymousBindMarkers implements BindMarkers {
// access via COUNTER_INCREMENTER
@SuppressWarnings("unused")
private volatile int counter = 0;
private volatile int counter;
/**