Skip to content

Commit a37e5b0

Browse files
authored
Merge pull request #17 from actiontech/fix-1231
Fix the infinite loop problem caused by incorrect password
2 parents 35db101 + c05aafd commit a37e5b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/com/actiontech/sqle/from/SQLESettingUI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ protected void textChanged(@NotNull DocumentEvent e) {
139139
String token = client.Login();
140140
settings.setToken(token);
141141
NotifyUtil.showTipsDialog("Test Connection", "Test Connection Success");
142+
projectBox.setFocusable(true);
142143
} catch (Exception e) {
143144
String errMessage = NotifyUtil.getExceptionMessage(e);
144145
NotifyUtil.showErrorMessageDialog("Test Connection Failed", errMessage);
@@ -177,7 +178,6 @@ public void focusGained(FocusEvent e) {
177178
String errMessage = NotifyUtil.getExceptionMessage(exception);
178179
NotifyUtil.showErrorMessageDialog("Get Project List Failed", errMessage);
179180
projectBox.setFocusable(false);
180-
projectBox.setFocusable(true);
181181
}
182182
}
183183

src/main/java/com/actiontech/sqle/util/HttpClientUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public String Login() throws Exception {
6060

6161
JsonObject resp = sendPostJson(uriHead + loginPath, formatStr);
6262
if (resp.get("code").getAsInt() != 0) {
63-
throw new Exception("login failed: " + resp.get("message").getAsString());
63+
throw new Exception("login failed,Please check user name and password,then click Test Connection button. " + resp.get("message").getAsString());
6464
}
6565
String tokenResp = resp.get("data").getAsJsonObject().get("token").getAsString();
6666
this.token = "Bearer " + tokenResp;

0 commit comments

Comments
 (0)