File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
vertx-sql-client/src/main/java/io/vertx/sqlclient Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -188,12 +188,13 @@ public int getIdleTimeout() {
188188 }
189189
190190 /**
191- * Establish an idle timeout for pooled connections.
191+ * Establish an idle timeout for pooled connections, a value of zero disables the idle timeout .
192192 *
193193 * @param idleTimeout the pool connection idle timeout
194194 * @return a reference to this, so the API can be used fluently
195195 */
196196 public PoolOptions setIdleTimeout (int idleTimeout ) {
197+ Arguments .require (idleTimeout >= 0 , "idleTimeout must be >= 0" );
197198 this .idleTimeout = idleTimeout ;
198199 return this ;
199200 }
@@ -224,12 +225,13 @@ public int getMaxLifetime() {
224225 }
225226
226227 /**
227- * Establish a max lifetime for pooled connections.
228+ * Establish a max lifetime for pooled connections, a value of zero disables the maximum lifetime .
228229 *
229230 * @param maxLifetime the pool connection max lifetime
230231 * @return a reference to this, so the API can be used fluently
231232 */
232233 public PoolOptions setMaxLifetime (int maxLifetime ) {
234+ Arguments .require (maxLifetime >= 0 , "maxLifetime must be >= 0" );
233235 this .maxLifetime = maxLifetime ;
234236 return this ;
235237 }
You can’t perform that action at this time.
0 commit comments