提交 a7348b06 编写于 作者: S Serge Rider

Merge remote-tracking branch 'origin/devel' into devel


Former-commit-id: de64cdbf
......@@ -81,7 +81,7 @@ public class PostgreTableColumnManager extends SQLTableColumnManager<PostgreTabl
switch (dataType.getDataKind()) {
case STRING:
final long length = column.getMaxLength();
if (length > 0) {
if (length > 0 && length < Integer.MAX_VALUE) {
sql.append('(').append(length).append(')');
}
break;
......
......@@ -6,6 +6,7 @@ import org.eclipse.jsch.ui.UserInfoPrompter;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.net.DBWHandlerConfiguration;
import org.jkiss.dbeaver.model.net.ssh.JSCHUserInfoPromptProvider;
import org.jkiss.utils.CommonUtils;
public class JSCHUIPromptProvider implements JSCHUserInfoPromptProvider {
......@@ -26,7 +27,7 @@ public class JSCHUIPromptProvider implements JSCHUserInfoPromptProvider {
@Override
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo) {
if (configuration.isSavePassword()) {
if (shouldUsePassword()) {
setPassword(configuration.getPassword());
}
return super.promptKeyboardInteractive(destination, name, instruction, prompt, echo);
......@@ -34,7 +35,7 @@ public class JSCHUIPromptProvider implements JSCHUserInfoPromptProvider {
@Override
public boolean promptPassword(String message) {
if (configuration.isSavePassword()) {
if (shouldUsePassword()) {
setPassword(configuration.getPassword());
return true;
}
......@@ -43,7 +44,7 @@ public class JSCHUIPromptProvider implements JSCHUserInfoPromptProvider {
@Override
public boolean promptPassphrase(String message) {
if (configuration.isSavePassword()) {
if (shouldUsePassword()) {
setPassphrase(configuration.getPassword());
return true;
}
......@@ -57,5 +58,8 @@ public class JSCHUIPromptProvider implements JSCHUserInfoPromptProvider {
log.debug(message);
}
private boolean shouldUsePassword() {
return configuration.isSavePassword() || CommonUtils.isNotEmpty(configuration.getPassword());
}
}
}
\ No newline at end of file
......@@ -1439,6 +1439,7 @@ public class DataSourceDescriptor
}
networkHandler.setPassword(authInfo.getUserPassword());
networkHandler.setSavePassword(authInfo.isSavePassword());
dataSourceContainer.getConnectionConfiguration().updateHandler(networkHandler);
} else {
if (!passwordOnly) {
dataSourceContainer.getConnectionConfiguration().setUserName(authInfo.getUserName());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册