Drop explicit zeroing at instantiation of Atomic* objects

This commit is contained in:
Сергей Цыпанов
2020-09-30 22:57:04 +03:00
committed by Juergen Hoeller
parent b7e1553c9d
commit 8a04910bdd
35 changed files with 64 additions and 64 deletions

View File

@@ -474,7 +474,7 @@ public class ConcurrentReferenceHashMap<K, V> extends AbstractMap<K, V> implemen
* The total number of references contained in this segment. This includes chained
* references and references that have been garbage collected but not purged.
*/
private final AtomicInteger count = new AtomicInteger(0);
private final AtomicInteger count = new AtomicInteger();
/**
* The threshold when resizing of the references should occur. When {@code count}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 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.
@@ -44,7 +44,7 @@ public class CustomizableThreadCreator implements Serializable {
@Nullable
private ThreadGroup threadGroup;
private final AtomicInteger threadCount = new AtomicInteger(0);
private final AtomicInteger threadCount = new AtomicInteger();
/**

View File

@@ -28,7 +28,7 @@ import java.util.concurrent.atomic.AtomicLong;
*/
public class SimpleIdGenerator implements IdGenerator {
private final AtomicLong leastSigBits = new AtomicLong(0);
private final AtomicLong leastSigBits = new AtomicLong();
@Override