Drop explicit zeroing at instantiation of Atomic* objects
This commit is contained in:
committed by
Juergen Hoeller
parent
b7e1553c9d
commit
8a04910bdd
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user