Skip to content

Commit 40c3f38

Browse files
committed
Use final
1 parent 1676279 commit 40c3f38

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/test/java/org/apache/commons/pool2/impl/TestBaseGenericObjectPool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ void testStatsStoreConcurrentAccess() throws Exception {
283283
pool.updateStatsBorrow(pooledObject, Duration.ofMillis(threadId * 10 + j));
284284
pool.updateStatsReturn(Duration.ofMillis(threadId * 20 + j));
285285
}
286-
} catch (Exception e) {
286+
} catch (final Exception e) {
287287
throw new RuntimeException(e);
288288
} finally {
289289
completeLatch.countDown();
@@ -296,7 +296,7 @@ void testStatsStoreConcurrentAccess() throws Exception {
296296
// Wait for completion
297297
assertTrue(completeLatch.await(30, TimeUnit.SECONDS), "Concurrent test should complete within 30 seconds");
298298
// Verify no exceptions occurred
299-
for (Future<Void> future : futures) {
299+
for (final Future<Void> future : futures) {
300300
future.get(); // Will throw if there was an exception
301301
}
302302
// Verify that statistics were collected (exact values may vary due to race conditions)

src/test/java/org/apache/commons/pool2/impl/TestGenericObjectPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ private List<Runnable> getRunnables(final int numThreads,
853853
try {
854854
startLatch.await(); // Wait for all threads to be ready
855855
genericObjectPool.addObject();
856-
} catch (Exception e) {
856+
} catch (final Exception e) {
857857
Thread.currentThread().interrupt(); // Restore interrupt status
858858
} finally {
859859
doneLatch.countDown();

0 commit comments

Comments
 (0)