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

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 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.
@@ -177,7 +177,7 @@ class MockHttpSessionTests {
private static class CountingHttpSessionBindingListener
implements HttpSessionBindingListener {
private final AtomicInteger counter = new AtomicInteger(0);
private final AtomicInteger counter = new AtomicInteger();
@Override
public void valueBound(HttpSessionBindingEvent event) {

View File

@@ -52,8 +52,8 @@ import static org.springframework.test.context.cache.ContextCacheTestUtils.reset
*/
class ClassLevelDirtiesContextTestNGTests {
private static final AtomicInteger cacheHits = new AtomicInteger(0);
private static final AtomicInteger cacheMisses = new AtomicInteger(0);
private static final AtomicInteger cacheHits = new AtomicInteger();
private static final AtomicInteger cacheMisses = new AtomicInteger();
@BeforeAll

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 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.
@@ -51,8 +51,8 @@ import static org.springframework.test.context.junit4.JUnitTestingUtils.runTests
*/
class ClassLevelDirtiesContextTests {
private static final AtomicInteger cacheHits = new AtomicInteger(0);
private static final AtomicInteger cacheMisses = new AtomicInteger(0);
private static final AtomicInteger cacheHits = new AtomicInteger();
private static final AtomicInteger cacheMisses = new AtomicInteger();
@BeforeAll

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 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.
@@ -43,8 +43,8 @@ import static org.springframework.test.context.junit4.JUnitTestingUtils.runTests
*/
class DirtiesContextInterfaceTests {
private static final AtomicInteger cacheHits = new AtomicInteger(0);
private static final AtomicInteger cacheMisses = new AtomicInteger(0);
private static final AtomicInteger cacheHits = new AtomicInteger();
private static final AtomicInteger cacheMisses = new AtomicInteger();
@BeforeAll

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 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.
@@ -86,7 +86,7 @@ public class HttpOptionsTests {
@Controller
private static class MyController {
private AtomicInteger counter = new AtomicInteger(0);
private AtomicInteger counter = new AtomicInteger();
@RequestMapping(value = "/myUrl", method = RequestMethod.OPTIONS)