removed else

pull/347/head
Nitin 10 years ago
parent 31113bf0d9
commit 9136e8e6dd

@ -824,7 +824,7 @@ public class HikariConfig implements HikariConfigMXBean
private void logConfiguration()
{
LOGGER.debug("HikariCP pool {} configuration:", poolName);
LOGGER.debug("{} - configuration:", poolName);
final Set<String> propertyNames = new TreeSet<>(PropertyElf.getPropertyNames(HikariConfig.class));
for (String prop : propertyNames) {
try {

@ -114,20 +114,17 @@ public final class PoolElf
Field field = Connection.class.getField(upperName);
return field.getInt(null);
}
else {
final int level = Integer.parseInt(transactionIsolationName);
//its number
switch (level) {
case Connection.TRANSACTION_READ_UNCOMMITTED:
case Connection.TRANSACTION_READ_COMMITTED:
case Connection.TRANSACTION_REPEATABLE_READ:
case Connection.TRANSACTION_SERIALIZABLE:
case Connection.TRANSACTION_NONE:
return level;
default:
throw new IllegalArgumentException();
}
}
final int level = Integer.parseInt(transactionIsolationName);
switch (level) {
case Connection.TRANSACTION_READ_UNCOMMITTED:
case Connection.TRANSACTION_READ_COMMITTED:
case Connection.TRANSACTION_REPEATABLE_READ:
case Connection.TRANSACTION_SERIALIZABLE:
case Connection.TRANSACTION_NONE:
return level;
default:
throw new IllegalArgumentException();
}
}
catch (Exception e) {
throw new IllegalArgumentException("Invalid transaction isolation value: " + transactionIsolationName);

Loading…
Cancel
Save