treat empty property as null

pull/496/head
Nitin 9 years ago
parent 1056a339a2
commit 2320bef366

@ -38,7 +38,7 @@ public abstract class PoolStats
public PoolStats(final long timeoutMs)
{
this.timeoutMs = timeoutMs;
this.reloadAt = new AtomicLong(0);
this.reloadAt = new AtomicLong();
this.clock = ClockSource.INSTANCE;
}

@ -67,14 +67,14 @@ abstract class PoolBase
this.config = config;
this.networkTimeout = -1;
this.catalog = config.getCatalog();
this.catalog = config.getCatalog() == null || config.getCatalog().isEmpty() ? null : config.getCatalog();
this.isReadOnly = config.isReadOnly();
this.isAutoCommit = config.isAutoCommit();
this.transactionIsolation = UtilityElf.getTransactionIsolation(config.getTransactionIsolation());
this.isQueryTimeoutSupported = UNINITIALIZED;
this.isNetworkTimeoutSupported = UNINITIALIZED;
this.isUseJdbc4Validation = config.getConnectionTestQuery() == null;
this.isUseJdbc4Validation = config.getConnectionTestQuery() == null || config.getConnectionTestQuery().isEmpty();
this.isIsolateInternalQueries = config.isIsolateInternalQueries();
this.poolName = config.getPoolName();

@ -94,7 +94,7 @@ public class ConcurrentBag<T extends IConcurrentBagEntry> implements AutoCloseab
this.listener = listener;
this.weakThreadLocals = useWeakThreadLocals();
this.waiters = new AtomicInteger(0);
this.waiters = new AtomicInteger();
this.sharedList = new CopyOnWriteArrayList<>();
this.synchronizer = new QueuedSequenceSynchronizer();
if (weakThreadLocals) {

@ -115,7 +115,7 @@ public final class UtilityElf
*/
public static int getTransactionIsolation(final String transactionIsolationName)
{
if (transactionIsolationName != null) {
if (transactionIsolationName != null && !transactionIsolationName.isEmpty()) {
try {
final String upperName = transactionIsolationName.toUpperCase();
if (upperName.startsWith("TRANSACTION_")) {

Loading…
Cancel
Save