Skip to content

Commit 496a2b1

Browse files
committed
Try to satisfy pmd executor service closing.
1 parent d6d514d commit 496a2b1

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

powertools-logging/src/test/java/software/amazon/lambda/powertools/logging/internal/KeyBufferTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void shouldBeThreadSafeForDifferentKeys() throws InterruptedException, IOExcepti
234234
int eventsPerThread = 100;
235235
KeyBuffer<String, String> largeBuffer = new KeyBuffer<>(10000, String::length);
236236
ExecutorService executor = Executors.newFixedThreadPool(threadCount);
237-
try (Closeable close = executor::shutdown) {
237+
try (Closeable ignored = executor::shutdown) {
238238
CountDownLatch latch = new CountDownLatch(threadCount);
239239

240240
// Each thread works with different key
@@ -270,7 +270,7 @@ void shouldBeThreadSafeForSameKey() throws InterruptedException, IOException {
270270
int eventsPerThread = 20;
271271
KeyBuffer<String, String> largeBuffer = new KeyBuffer<>(10000, String::length);
272272
ExecutorService executor = Executors.newFixedThreadPool(threadCount);
273-
try (Closeable close = executor::shutdown) {
273+
try (Closeable ignored = executor::shutdown) {
274274
CountDownLatch latch = new CountDownLatch(threadCount);
275275

276276
// All threads work with same key

powertools-logging/src/test/java/software/amazon/lambda/powertools/logging/internal/LoggingManagerRegistryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ void testGetLoggingManager_shouldBeThreadSafe() throws InterruptedException, IOE
116116
// GIVEN
117117
int threadCount = 10;
118118
ExecutorService executor = Executors.newFixedThreadPool(threadCount);
119-
try (Closeable close = executor::shutdown) {
119+
try (Closeable ignored = executor::shutdown) {
120120
CountDownLatch latch = new CountDownLatch(threadCount);
121121
AtomicReference<LoggingManager> sharedInstance = new AtomicReference<>();
122122

0 commit comments

Comments
 (0)