提交 657758aa authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use ConnectionInfo.getProperty(String, boolean) in SessionRemote

上级 9ab420f0
......@@ -333,7 +333,7 @@ public class ConnectionInfo implements Cloneable {
* @param defaultValue the default value
* @return the value
*/
boolean getProperty(String key, boolean defaultValue) {
public boolean getProperty(String key, boolean defaultValue) {
return Utils.parseBoolean(getProperty(key, null), defaultValue, false);
}
......
......@@ -335,8 +335,7 @@ public class SessionRemote extends SessionWithState implements DataHandler {
}
// create the session using reflection,
// so that the JDBC layer can be compiled without it
boolean autoServerMode = Boolean.parseBoolean(
ci.getProperty("AUTO_SERVER", "false"));
boolean autoServerMode = ci.getProperty("AUTO_SERVER", false);
ConnectionInfo backup = null;
try {
if (autoServerMode) {
......@@ -413,11 +412,9 @@ public class SessionRemote extends SessionWithState implements DataHandler {
serverList = StringUtils.quoteStringSQL(server);
ci.setProperty("CLUSTER", Constants.CLUSTERING_ENABLED);
}
autoReconnect = Boolean.parseBoolean(ci.getProperty(
"AUTO_RECONNECT", "false"));
autoReconnect = ci.getProperty("AUTO_RECONNECT", false);
// AUTO_SERVER implies AUTO_RECONNECT
boolean autoServer = Boolean.parseBoolean(ci.getProperty(
"AUTO_SERVER", "false"));
boolean autoServer = ci.getProperty("AUTO_SERVER", false);
if (autoServer && serverList != null) {
throw DbException
.getUnsupportedException("autoServer && serverList != null");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论