Skip to content

Commit

Permalink
Remove unused code and reuse predefined variable.
Browse files Browse the repository at this point in the history
Signed-off-by: jitokim <pigberger70@gmail.com>
Co-authored-by: jito <jito.kim@mathpresso.com>

[resolves #188]
  • Loading branch information
jitokim authored and mp911de committed Jul 11, 2023
1 parent 6e5577b commit b94960a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/io/r2dbc/pool/ConnectionPool.java
Expand Up @@ -268,7 +268,6 @@ private InstrumentedPool<Connection> createConnectionPool(ConnectionPoolConfigur
return isIdleTimeExceeded || isLifeTimeExceeded;
};

int cpuCount = Runtime.getRuntime().availableProcessors();
PoolBuilder<Connection, PoolConfig<Connection>> builder = PoolBuilder.from(allocator)
.clock(configuration.getClock())
.metricsRecorder(metricsRecorder)
Expand All @@ -287,8 +286,8 @@ private InstrumentedPool<Connection> createConnectionPool(ConnectionPoolConfigur
if (!backgroundEvictionInterval.isZero()) {
if (!backgroundEvictionInterval.isNegative()) {
builder.evictInBackground(backgroundEvictionInterval);
} else if (!configuration.getMaxIdleTime().isNegative()) {
builder.evictInBackground(configuration.getMaxIdleTime());
} else if (!maxIdleTime.isNegative()) {
builder.evictInBackground(maxIdleTime);
}
}

Expand Down

0 comments on commit b94960a

Please sign in to comment.