Minor cleanup.

pull/131/head
Brett Wooldridge 11 years ago
parent 775cba7db5
commit a7e8852a9f

@ -410,7 +410,7 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener
{
try {
final boolean timeoutEnabled = (configuration.getConnectionTimeout() != Integer.MAX_VALUE);
timeoutMs = timeoutEnabled ? Math.max(1000L, timeoutMs) : 0;
timeoutMs = timeoutEnabled ? Math.max(1000L, timeoutMs) : 0L;
if (isJdbc4ConnectionTest) {
return connection.isValid((int) TimeUnit.MILLISECONDS.toSeconds(timeoutMs));
@ -484,7 +484,7 @@ public final class HikariPool implements HikariPoolMBean, IBagStateListener
}
assassinExecutor.shutdown();
assassinExecutor.awaitTermination(5, TimeUnit.SECONDS);
assassinExecutor.awaitTermination(5L, TimeUnit.SECONDS);
}
/**

@ -133,7 +133,7 @@ public class ConcurrentBag<T extends com.zaxxer.hikari.util.ConcurrentBag.IBagMa
timeout -= (System.nanoTime() - startScan);
}
while (timeout > 0);
while (timeout > 0L);
return null;
}
@ -164,7 +164,7 @@ public class ConcurrentBag<T extends com.zaxxer.hikari.util.ConcurrentBag.IBagMa
synchronizer.releaseShared(System.nanoTime());
}
else {
throw new IllegalStateException("Value was returned to the bag that was not borrowed: ");
throw new IllegalStateException("Value was returned to the bag that was not borrowed: " + value);
}
}
@ -319,7 +319,7 @@ public class ConcurrentBag<T extends com.zaxxer.hikari.util.ConcurrentBag.IBagMa
@Override
protected long tryAcquireShared(long startScanTime)
{
return getState() >= startScanTime && !java67hasQueuedPredecessors() ? 1 : -1;
return getState() >= startScanTime && !java67hasQueuedPredecessors() ? 1L : -1L;
}
/** {@inheritDoc} */

Loading…
Cancel
Save