diff --git a/src/main/java/com/zaxxer/hikari/HikariConfig.java b/src/main/java/com/zaxxer/hikari/HikariConfig.java
index f0cc081c..3a6eb1c1 100644
--- a/src/main/java/com/zaxxer/hikari/HikariConfig.java
+++ b/src/main/java/com/zaxxer/hikari/HikariConfig.java
@@ -145,9 +145,9 @@ public class HikariConfig implements HikariConfigMXBean
}
/**
- * Construct a HikariConfig from the specified property file name. propertyFileName
+ * Construct a HikariConfig from the specified property file name. propertyFileName
* will first be treated as a path in the file-system, and if that fails the
- * Class.getResourceAsStream(propertyFileName) will be tried.
+ * Class.getResourceAsStream(propertyFileName)
will be tried.
*
* @param propertyFileName the name of the property file
*/
@@ -397,7 +397,7 @@ public class HikariConfig implements HikariConfigMXBean
/**
* Set the SQL string that will be executed on all new connections when they are
- * created, before they are added to the pool. If this query fails, it will be
+ * created, before they are added to the pool. If this query fails, it will be
* treated as a failed connection attempt.
*
* @param connectionInitSql the SQL to execute on new connections
@@ -420,7 +420,7 @@ public class HikariConfig implements HikariConfigMXBean
}
/**
- * Set a {@link DataSource} for the pool to explicitly wrap. This setter is not
+ * Set a {@link DataSource} for the pool to explicitly wrap. This setter is not
* available through property file based initialization.
*
* @param dataSource a specific {@link DataSource} to be wrapped by the pool
@@ -456,7 +456,7 @@ public class HikariConfig implements HikariConfigMXBean
* Add a property (name/value pair) that will be used to configure the {@link DataSource}/{@link java.sql.Driver}.
*
* In the case of a {@link DataSource}, the property names will be translated to Java setters following the Java Bean - * naming convention. For example, the property {@code cachePrepStmts} will translate into {@code setCachePrepStmts()} + * naming convention. For example, the property {@code cachePrepStmts} will translate into {@code setCachePrepStmts()} * with the {@code value} passed as a parameter. *
* In the case of a {@link java.sql.Driver}, the property will be added to a {@link Properties} instance that will @@ -568,8 +568,8 @@ public class HikariConfig implements HikariConfigMXBean } /** - * Set whether or not pool suspension is allowed. There is a performance - * impact when pool suspension is enabled. Unless you need it (for a + * Set whether pool suspension is allowed. There is a performance + * impact when pool suspension is enabled. Unless you need it (for a * redundancy system for example) do not enable it. * * @param isAllowPoolSuspension the desired pool suspension allowance @@ -581,7 +581,7 @@ public class HikariConfig implements HikariConfigMXBean } /** - * Get the pool initialization failure timeout. See {@code #setInitializationFailTimeout(long)} + * Get the pool initialization failure timeout. See {@code #setInitializationFailTimeout(long)} * for details. * * @return the number of milliseconds before the pool initialization fails @@ -593,32 +593,32 @@ public class HikariConfig implements HikariConfigMXBean } /** - * Set the pool initialization failure timeout. This setting applies to pool + * Set the pool initialization failure timeout. This setting applies to pool * initialization when {@link HikariDataSource} is constructed with a {@link HikariConfig}, * or when {@link HikariDataSource} is constructed using the no-arg constructor * and {@link HikariDataSource#getConnection()} is called. *
Connection
class, eg.
+ * Set the default transaction isolation level. The specified value is the
+ * constant name from the Connection
class, for example:
* TRANSACTION_REPEATABLE_READ
.
*
* @param isolationLevel the name of the isolation level
@@ -1143,7 +1143,7 @@ public class HikariConfig implements HikariConfigMXBean
LOGGER.warn("{} - idleTimeout is less than 10000ms, setting to default {}ms.", poolName, IDLE_TIMEOUT);
idleTimeout = IDLE_TIMEOUT;
}
- else if (idleTimeout != IDLE_TIMEOUT && idleTimeout != 0 && minIdle == maxPoolSize) {
+ else if (idleTimeout != IDLE_TIMEOUT && idleTimeout != 0 && minIdle == maxPoolSize) {
LOGGER.warn("{} - idleTimeout has been set but has no effect because the pool is operating as a fixed size pool.", poolName);
}
}
diff --git a/src/main/java/com/zaxxer/hikari/HikariConfigMXBean.java b/src/main/java/com/zaxxer/hikari/HikariConfigMXBean.java
index 10539114..f1f71a72 100644
--- a/src/main/java/com/zaxxer/hikari/HikariConfigMXBean.java
+++ b/src/main/java/com/zaxxer/hikari/HikariConfigMXBean.java
@@ -19,7 +19,7 @@ package com.zaxxer.hikari;
import com.zaxxer.hikari.util.Credentials;
/**
- * The javax.management MBean for a Hikari pool configuration.
+ * The {@code javax.management} MBean for a Hikari pool configuration.
*
* @author Brett Wooldridge
*/
@@ -116,7 +116,7 @@ public interface HikariConfigMXBean
/**
* The property controls the minimum number of idle connections that HikariCP tries to maintain in the pool,
* including both idle and in-use connections. If the idle connections dip below this value, HikariCP will
- * make a best effort to restore them quickly and efficiently.
+ * make the best effort to restore them quickly and efficiently.
*
* @return the minimum number of connections in the pool
*/
@@ -125,7 +125,7 @@ public interface HikariConfigMXBean
/**
* The property controls the minimum number of idle connections that HikariCP tries to maintain in the pool,
* including both idle and in-use connections. If the idle connections dip below this value, HikariCP will
- * make a best effort to restore them quickly and efficiently.
+ * make the best effort to restore them quickly and efficiently.
*
* @param minIdle the minimum number of idle connections in the pool to maintain
*/
diff --git a/src/main/java/com/zaxxer/hikari/HikariDataSource.java b/src/main/java/com/zaxxer/hikari/HikariDataSource.java
index 335a438b..3cf2b0bc 100644
--- a/src/main/java/com/zaxxer/hikari/HikariDataSource.java
+++ b/src/main/java/com/zaxxer/hikari/HikariDataSource.java
@@ -47,12 +47,12 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea
private volatile HikariPool pool;
/**
- * Default constructor. Setters are used to configure the pool. Using
+ * Default constructor. Setters are used to configure the pool. Using
* this constructor vs. {@link #HikariDataSource(HikariConfig)} will
* result in {@link #getConnection()} performance that is slightly lower
* due to lazy initialization checks.
- *
- * The first call to {@link #getConnection()} starts the pool. Once the pool
+ * + * The first call to {@link #getConnection()} starts the pool. Once the pool * is started, the configuration is "sealed" and no further configuration * changes are possible -- except via {@link HikariConfigMXBean} methods. */ @@ -62,10 +62,10 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea } /** - * Construct a HikariDataSource with the specified configuration. The + * Construct a HikariDataSource with the specified configuration. The * {@link HikariConfig} is copied and the pool is started by invoking this * constructor. - * + *
* The {@link HikariConfig} can be modified without affecting the HikariDataSource * and used to initialize another HikariDataSource instance. * @@ -297,7 +297,7 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea } /** - * Get the {@code HikariPoolMXBean} for this HikariDataSource instance. If this method is called on + * Get the {@code HikariPoolMXBean} for this HikariDataSource instance. If this method is called on * a {@code HikariDataSource} that has been constructed without a {@code HikariConfig} instance, * and before an initial call to {@code #getConnection()}, the return value will be {@code null}. * @@ -319,9 +319,9 @@ public class HikariDataSource extends HikariConfig implements DataSource, Closea } /** - * Evict a connection from the pool. If the connection has already been closed (returned to the pool) + * Evict a connection from the pool. If the connection has already been closed (returned to the pool) * this may result in a "soft" eviction; the connection will be evicted sometime in the future if it is - * currently in use. If the connection has not been closed, the eviction is immediate. + * currently in use. If the connection has not been closed, the eviction is immediate. * * @param connection the connection to evict from the pool */ diff --git a/src/main/java/com/zaxxer/hikari/HikariPoolMXBean.java b/src/main/java/com/zaxxer/hikari/HikariPoolMXBean.java index bdc8a07a..47eb0b29 100644 --- a/src/main/java/com/zaxxer/hikari/HikariPoolMXBean.java +++ b/src/main/java/com/zaxxer/hikari/HikariPoolMXBean.java @@ -19,7 +19,7 @@ package com.zaxxer.hikari; import javax.sql.DataSource; /** - * The javax.management MBean for a Hikari pool instance. + * The {@code javax.management} MBean for a Hikari pool instance. * * @author Brett Wooldridge */ @@ -28,7 +28,7 @@ public interface HikariPoolMXBean /** * Get the number of currently idle connections in the pool. *
- * The return value is extremely transient and is a point-in-time measurement. Therefore, due to a time + * The return value is extremely transient and is a point-in-time measurement. Therefore, due to a time * difference between invoking this method and {@link #getActiveConnections()}, it is possible for the sum * of idle plus active connections to be either less than or greater than the value returned by * {@link #getTotalConnections()}. @@ -40,7 +40,7 @@ public interface HikariPoolMXBean /** * Get the number of currently active connections in the pool. *
- * The return value is extremely transient and is a point-in-time measurement. Therefore, due to a time
+ * The return value is extremely transient and is a point-in-time measurement. Therefore, due to a time
* difference between invoking this method and {@link #getIdleConnections()}, it is possible for the sum
* of idle plus active connections to be either less than or greater than the value returned by
* {@link #getTotalConnections()}.
@@ -50,7 +50,7 @@ public interface HikariPoolMXBean
int getActiveConnections();
/**
- * Get the total number of connections currently in the pool. The return value is transient and is a
+ * Get the total number of connections currently in the pool. The return value is transient and is a
* point-in-time measurement.
*
* @return the total number of connections in the pool
@@ -58,7 +58,7 @@ public interface HikariPoolMXBean
int getTotalConnections();
/**
- * Get the number of threads awaiting connections from the pool. The return value is extremely transient and is
+ * Get the number of threads awaiting connections from the pool. The return value is extremely transient and is
* a point-in-time measurement.
*
* @return the number of threads awaiting a connection from the pool
@@ -72,7 +72,7 @@ public interface HikariPoolMXBean
void softEvictConnections();
/**
- * Suspend the pool. When the pool is suspended, threads calling {@link DataSource#getConnection()} will be
+ * Suspend the pool. When the pool is suspended, threads calling {@link DataSource#getConnection()} will be
* blocked with no timeout until the pool is resumed via the {@link #resumePool()} method.
*
* This method has no effect unless the {@link HikariConfig#setAllowPoolSuspension(boolean)} method or equivalent
@@ -81,7 +81,7 @@ public interface HikariPoolMXBean
void suspendPool();
/**
- * Resume the pool. Enables connection borrowing to resume on a pool that has been suspended via the
+ * Resume the pool. Enables connection borrowing to resume on a pool that has been suspended via the
* {@link #suspendPool()} method.
*
* This method has no effect unless the {@link HikariConfig#setAllowPoolSuspension(boolean)} method or equivalent
diff --git a/src/main/java/com/zaxxer/hikari/SQLExceptionOverride.java b/src/main/java/com/zaxxer/hikari/SQLExceptionOverride.java
index 17168d8e..d5e48cb4 100644
--- a/src/main/java/com/zaxxer/hikari/SQLExceptionOverride.java
+++ b/src/main/java/com/zaxxer/hikari/SQLExceptionOverride.java
@@ -4,9 +4,9 @@ import java.sql.SQLException;
/**
* Users can implement this interface to override the default SQLException handling
- * of HikariCP. By the time an instance of this interface is invoked HikariCP has
+ * of HikariCP. By the time an instance of this interface is invoked HikariCP has
* already made a determination to evict the Connection from the pool.
- *
+ *
* If the {@link #adjudicate(SQLException)} method returns {@link Override#CONTINUE_EVICT} the eviction will occur, but if the * method returns {@link Override#DO_NOT_EVICT} the eviction will be elided. */ diff --git a/src/main/java/com/zaxxer/hikari/hibernate/HikariConnectionProvider.java b/src/main/java/com/zaxxer/hikari/hibernate/HikariConnectionProvider.java index 4f9656c4..ffea3d5d 100644 --- a/src/main/java/com/zaxxer/hikari/hibernate/HikariConnectionProvider.java +++ b/src/main/java/com/zaxxer/hikari/hibernate/HikariConnectionProvider.java @@ -68,7 +68,7 @@ public class HikariConnectionProvider implements ConnectionProvider, Configurabl this.hds = null; if (Version.getVersionString().substring(0, 5).compareTo("4.3.6") >= 1) { LOGGER.warn("com.zaxxer.hikari.hibernate.HikariConnectionProvider has been deprecated for versions of " - + "Hibernate 4.3.6 and newer. Please switch to org.hibernate.hikaricp.internal.HikariCPConnectionProvider."); + + "Hibernate 4.3.6 and newer. Please switch to org.hibernate.hikaricp.internal.HikariCPConnectionProvider."); } } diff --git a/src/main/java/com/zaxxer/hikari/metrics/PoolStats.java b/src/main/java/com/zaxxer/hikari/metrics/PoolStats.java index 8fb4ed08..1c693369 100644 --- a/src/main/java/com/zaxxer/hikari/metrics/PoolStats.java +++ b/src/main/java/com/zaxxer/hikari/metrics/PoolStats.java @@ -109,5 +109,5 @@ public abstract class PoolStats return true; } } - } + } } diff --git a/src/main/java/com/zaxxer/hikari/metrics/dropwizard/CodahaleHealthChecker.java b/src/main/java/com/zaxxer/hikari/metrics/dropwizard/CodahaleHealthChecker.java index c46f9f81..be6b8718 100644 --- a/src/main/java/com/zaxxer/hikari/metrics/dropwizard/CodahaleHealthChecker.java +++ b/src/main/java/com/zaxxer/hikari/metrics/dropwizard/CodahaleHealthChecker.java @@ -28,13 +28,13 @@ import java.sql.SQLException; import java.util.concurrent.TimeUnit; /** - * Provides Dropwizard HealthChecks. Two health checks are provided: + * Provides Dropwizard HealthChecks. Two health checks are provided: *
connectionTimeout
, unless the health check property
- * connectivityCheckTimeoutMs
is defined. However, if either the connectionTimeout
+ * connectivityCheckTimeoutMs
is defined. However, if either the connectionTimeout
* or the connectivityCheckTimeoutMs
is 0 (infinite), a timeout of 10 seconds will be used.
* * The Connection99Percent health check will only be registered if the health check property diff --git a/src/main/java/com/zaxxer/hikari/pool/HikariPool.java b/src/main/java/com/zaxxer/hikari/pool/HikariPool.java index ae97e403..b04ee3a4 100644 --- a/src/main/java/com/zaxxer/hikari/pool/HikariPool.java +++ b/src/main/java/com/zaxxer/hikari/pool/HikariPool.java @@ -276,7 +276,7 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag } /** - * Set a metrics registry to be used when registering metrics collectors. The HikariDataSource prevents this + * Set a metrics registry to be used when registering metrics collectors. The HikariDataSource prevents this * method from being called more than once. * * @param metricRegistry the metrics registry instance to use @@ -311,7 +311,7 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag } /** - * Set the health check registry to be used when registering health checks. Currently only Codahale health + * Set the health check registry to be used when registering health checks. Currently only Codahale health * checks are supported. * * @param healthCheckRegistry the health check registry instance to use @@ -470,7 +470,7 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag // *********************************************************************** /** - * Creating new poolEntry. If maxLifetime is configured, create a future End-of-life task with 2.5% variance from + * Creating new poolEntry. If maxLifetime is configured, create a future End-of-life task with 2.5% variance from * the maxLifetime time to ensure there is no massive die-off of Connections in the pool. */ private PoolEntry createPoolEntry() @@ -603,11 +603,11 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag } /** - * "Soft" evict a Connection (/PoolEntry) from the pool. If this method is being called by the user directly + * "Soft" evict a Connection (/PoolEntry) from the pool. If this method is being called by the user directly * through {@link com.zaxxer.hikari.HikariDataSource#evictConnection(Connection)} then {@code owner} is {@code true}. - * + *
* If the caller is the owner, or if the Connection is idle (i.e. can be "reserved" in the {@link ConcurrentBag}), - * then we can close the connection immediately. Otherwise, we leave it "marked" for eviction so that it is evicted + * then we can close the connection immediately. Otherwise, we leave it "marked" for eviction so that it is evicted * the next time someone tries to acquire it from the pool. * * @param poolEntry the PoolEntry (/Connection) to "soft" evict from the pool @@ -627,8 +627,8 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag } /** - * Create/initialize the Housekeeping service {@link ScheduledExecutorService}. If the user specified an Executor - * to be used in the {@link HikariConfig}, then we use that. If no Executor was specified (typical), then create + * Create/initialize the Housekeeping service {@link ScheduledExecutorService}. If the user specified an Executor + * to be used in the {@link HikariConfig}, then we use that. If no Executor was specified (typical), then create * an Executor and configure it. * * @return either the user specified {@link ScheduledExecutorService}, or the one we created @@ -679,11 +679,11 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag /** * Create a timeout exception (specifically, {@link SQLTransientConnectionException}) to be thrown, because a - * timeout occurred when trying to acquire a Connection from the pool. If there was an underlying cause for the + * timeout occurred when trying to acquire a Connection from the pool. If there was an underlying cause for the * timeout, e.g. a SQLException thrown by the driver while trying to create a new Connection, then use the * SQL State from that exception as our own and additionally set that exception as the "next" SQLException inside * our exception. - * + *
* As a side effect, log the timeout failure at DEBUG, and record the timeout failure in the metrics tracker.
*
* @param startTime the start time (timestamp) of the acquisition attempt
@@ -769,7 +769,7 @@ public final class HikariPool extends PoolBase implements HikariPoolMXBean, IBag
/**
* We only create connections if we need another idle connection or have threads still waiting
- * for a new connection. Otherwise we bail out of the request to create.
+ * for a new connection. Otherwise, we bail out of the request to create.
*
* @return true if we should create a connection, false if the need has disappeared
*/
diff --git a/src/main/java/com/zaxxer/hikari/pool/PoolBase.java b/src/main/java/com/zaxxer/hikari/pool/PoolBase.java
index 6ce3b616..f5e7ac36 100644
--- a/src/main/java/com/zaxxer/hikari/pool/PoolBase.java
+++ b/src/main/java/com/zaxxer/hikari/pool/PoolBase.java
@@ -347,7 +347,7 @@ abstract class PoolBase
/**
* Obtain connection from data source.
*
- * @return a Connection connection
+ * @return a connection
*/
private Connection newConnection() throws Exception
{
@@ -388,7 +388,7 @@ abstract class PoolBase
}
/**
- * Setup a connection initial state.
+ * Set up a connection initial state.
*
* @param connection a Connection
* @throws ConnectionSetupException thrown if any exception is encountered
@@ -517,7 +517,7 @@ abstract class PoolBase
/**
* Set the network timeout, if isUseNetworkTimeout
is true
and the
- * driver supports it. Return the pre-existing value of the network timeout.
+ * driver supports it. Return the pre-existing value of the network timeout.
*
* @param connection the connection to set the network timeout on
* @param timeoutMs the number of milliseconds before timeout
@@ -630,7 +630,7 @@ abstract class PoolBase
/**
* This will create a string for debug logging. Given a set of "reset bits", this
* method will return a concatenated string, for example:
- *
+ *
* Input : 0b00110 * Output: "autoCommit, isolation" * @@ -700,7 +700,7 @@ abstract class PoolBase } /** - * A class that delegates to a MetricsTracker implementation. The use of a delegate + * A class that delegates to a MetricsTracker implementation. The use of a delegate * allows us to use the NopMetricsTrackerDelegate when metrics are disabled, which in * turn allows the JIT to completely optimize away to callsites to record metrics. */ diff --git a/src/main/java/com/zaxxer/hikari/pool/ProxyLeakTask.java b/src/main/java/com/zaxxer/hikari/pool/ProxyLeakTask.java index f61f723b..2db3550f 100644 --- a/src/main/java/com/zaxxer/hikari/pool/ProxyLeakTask.java +++ b/src/main/java/com/zaxxer/hikari/pool/ProxyLeakTask.java @@ -24,7 +24,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * A Runnable that is scheduled in the future to report leaks. The ScheduledFuture is + * A Runnable that is scheduled in the future to report leaks. The ScheduledFuture is * cancelled if the connection is closed before the leak time expires. * * @author Brett Wooldridge diff --git a/src/main/java/com/zaxxer/hikari/pool/ProxyLeakTaskFactory.java b/src/main/java/com/zaxxer/hikari/pool/ProxyLeakTaskFactory.java index 9eafdcc6..8a7f3426 100644 --- a/src/main/java/com/zaxxer/hikari/pool/ProxyLeakTaskFactory.java +++ b/src/main/java/com/zaxxer/hikari/pool/ProxyLeakTaskFactory.java @@ -26,7 +26,7 @@ import java.util.concurrent.ScheduledExecutorService; */ class ProxyLeakTaskFactory { - private ScheduledExecutorService executorService; + private final ScheduledExecutorService executorService; private long leakDetectionThreshold; ProxyLeakTaskFactory(final long leakDetectionThreshold, final ScheduledExecutorService executorService) diff --git a/src/main/java/com/zaxxer/hikari/pool/ProxyResultSet.java b/src/main/java/com/zaxxer/hikari/pool/ProxyResultSet.java index 286c1dc5..3e9bffce 100644 --- a/src/main/java/com/zaxxer/hikari/pool/ProxyResultSet.java +++ b/src/main/java/com/zaxxer/hikari/pool/ProxyResultSet.java @@ -56,7 +56,7 @@ public abstract class ProxyResultSet implements ResultSet /** {@inheritDoc} */ @Override - public final Statement getStatement() throws SQLException + public final Statement getStatement() { return statement; } diff --git a/src/main/java/com/zaxxer/hikari/util/ClockSource.java b/src/main/java/com/zaxxer/hikari/util/ClockSource.java index 6d024504..58ced107 100644 --- a/src/main/java/com/zaxxer/hikari/util/ClockSource.java +++ b/src/main/java/com/zaxxer/hikari/util/ClockSource.java @@ -34,7 +34,7 @@ import java.util.concurrent.TimeUnit; */ public interface ClockSource { - static ClockSource CLOCK = Factory.create(); + ClockSource CLOCK = Factory.create(); /** * Get the current time-stamp (resolution is opaque). @@ -142,7 +142,7 @@ public interface ClockSource /** * Get the TimeUnit the ClockSource is denominated in. - * @return + * @return the TimeUnit */ static TimeUnit getSourceTimeUnit() { return CLOCK.getSourceTimeUnit0(); diff --git a/src/main/java/com/zaxxer/hikari/util/ConcurrentBag.java b/src/main/java/com/zaxxer/hikari/util/ConcurrentBag.java index 971cb8d7..1e7dcbe5 100644 --- a/src/main/java/com/zaxxer/hikari/util/ConcurrentBag.java +++ b/src/main/java/com/zaxxer/hikari/util/ConcurrentBag.java @@ -39,17 +39,17 @@ import static java.util.concurrent.locks.LockSupport.parkNanos; /** * This is a specialized concurrent bag that achieves superior performance * to LinkedBlockingQueue and LinkedTransferQueue for the purposes of a - * connection pool. It uses ThreadLocal storage when possible to avoid + * connection pool. It uses ThreadLocal storage when possible to avoid * locks, but resorts to scanning a common collection if there are no - * available items in the ThreadLocal list. Not-in-use items in the + * available items in the ThreadLocal list. Not-in-use items in the * ThreadLocal lists can be "stolen" when the borrowing thread has none - * of its own. It is a "lock-less" implementation using a specialized + * of its own. It is a "lock-less" implementation using a specialized * AbstractQueuedLongSynchronizer to manage cross-thread signaling. *
* Note that items that are "borrowed" from the bag are not actually
* removed from any collection, so garbage collection will not occur
- * even if the reference is abandoned. Thus care must be taken to
- * "requite" borrowed objects otherwise a memory leak will result. Only
+ * even if the reference is abandoned. Thus care must be taken to
+ * "requite" borrowed objects otherwise a memory leak will result. Only
* the "remove" method can completely remove an object from the bag.
*
* @author Brett Wooldridge
@@ -164,7 +164,7 @@ public class ConcurrentBagborrow(long, TimeUnit)
or reserve(T)
*
* @param bagEntry the value to remove
@@ -251,8 +251,8 @@ public class ConcurrentBagreserve(T)
+ * items in the bag in the specified state. It does not "lock"
+ * or reserve items in any way. Call reserve(T)
* on items in list before performing any action on them.
*
* @param state one of the {@link IConcurrentBagEntry} states
@@ -266,8 +266,8 @@ public class ConcurrentBagreserve(T)
+ * This method provides a "snapshot" in time of the bag items. It
+ * does not "lock" or reserve items in any way. Call reserve(T)
* on items in the list, or understand the concurrency implications of
* modifying items, before performing any action on them.
*
@@ -281,15 +281,15 @@ public class ConcurrentBagvalues(int)
method. Items that are
+ * borrowing. It is primarily used when wanting to operate on items
+ * returned by the values(int)
method. Items that are
* reserved can be removed from the bag via remove(T)
- * without the need to unreserve them. Items that are not removed
+ * without the need to unreserve them. Items that are not removed
* from the bag can be make available for borrowing again by calling
* the unreserve(T)
method.
*
* @param bagEntry the item to reserve
- * @return true if the item was able to be reserved, false otherwise
+ * @return true if the item is able to reserve, false otherwise
*/
public boolean reserve(final T bagEntry)
{
diff --git a/src/main/java/com/zaxxer/hikari/util/DriverDataSource.java b/src/main/java/com/zaxxer/hikari/util/DriverDataSource.java
index fe7f908c..2e47d245 100644
--- a/src/main/java/com/zaxxer/hikari/util/DriverDataSource.java
+++ b/src/main/java/com/zaxxer/hikari/util/DriverDataSource.java
@@ -152,13 +152,13 @@ public final class DriverDataSource implements DataSource
}
@Override
- public void setLoginTimeout(int seconds) throws SQLException
+ public void setLoginTimeout(int seconds)
{
DriverManager.setLoginTimeout(seconds);
}
@Override
- public int getLoginTimeout() throws SQLException
+ public int getLoginTimeout()
{
return DriverManager.getLoginTimeout();
}
diff --git a/src/main/java/com/zaxxer/hikari/util/FastList.java b/src/main/java/com/zaxxer/hikari/util/FastList.java
index ef384a42..70626537 100644
--- a/src/main/java/com/zaxxer/hikari/util/FastList.java
+++ b/src/main/java/com/zaxxer/hikari/util/FastList.java
@@ -105,7 +105,7 @@ public final class FastList