From aa1e138fbd387a302e3dbb9d8c0401fc483969ba Mon Sep 17 00:00:00 2001 From: Yanming Zhou Date: Fri, 1 Nov 2024 23:37:03 +0800 Subject: [PATCH] Fix the wrong configuration name in Javadoc and rename variable (#2248) --- src/main/java/com/zaxxer/hikari/pool/HikariPool.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/zaxxer/hikari/pool/HikariPool.java b/src/main/java/com/zaxxer/hikari/pool/HikariPool.java index 1f7cec84..a93bca45 100644 --- a/src/main/java/com/zaxxer/hikari/pool/HikariPool.java +++ b/src/main/java/com/zaxxer/hikari/pool/HikariPool.java @@ -552,15 +552,15 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag } /** - * If initializationFailFast is configured, check that we have DB connectivity. + * If {@code initializationFailTimeout} is configured, check that we have DB connectivity. * * @throws PoolInitializationException if fails to create or validate connection * @see HikariConfig#setInitializationFailTimeout(long) */ private void checkFailFast() { - final var initializationTimeout = config.getInitializationFailTimeout(); - if (initializationTimeout < 0) { + final var initializationFailTimeout = config.getInitializationFailTimeout(); + if (initializationFailTimeout < 0) { return; } @@ -584,9 +584,9 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag } quietlySleep(SECONDS.toMillis(1)); - } while (elapsedMillis(startTime) < initializationTimeout); + } while (elapsedMillis(startTime) < initializationFailTimeout); - if (initializationTimeout > 0) { + if (initializationFailTimeout > 0) { throwPoolInitializationException(getLastConnectionFailure()); } }