Browse Source

无jira任务 SonarQube

master
vito 7 years ago
parent
commit
fba3595d78
  1. 5
      designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java
  2. 7
      designer_base/src/com/fr/design/extra/LoginWebBridge.java

5
designer/src/com/fr/design/mainframe/bbs/UserInfoLabel.java

@ -87,6 +87,10 @@ public class UserInfoLabel extends UILabel {
}
public UserInfoLabel(UserInfoPane userInfoPane) {
init(userInfoPane);
}
private void init(UserInfoPane userInfoPane) {
this.userInfoPane = userInfoPane;
String userName = ConfigManager.getProviderInstance().getBbsUsername();
@ -158,6 +162,7 @@ public class UserInfoLabel extends UILabel {
showWindow.invoke(instance, SiteCenter.getInstance().acquireUrlByKind("bbs.popup"));
DesignerEnvManager.getEnvManager().setLastShowBBSNewsTime(DateUtils.DATEFORMAT2.format(new Date()));
} catch (Throwable ignored) {
// ignored
}
}
});

7
designer_base/src/com/fr/design/extra/LoginWebBridge.java

@ -8,6 +8,7 @@ import com.fr.design.extra.exe.PluginLoginExecutor;
import com.fr.design.extra.ucenter.Client;
import com.fr.design.extra.ucenter.XMLHelper;
import com.fr.design.gui.ilable.UILabel;
import com.fr.general.ComparatorUtils;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient;
import com.fr.json.JSONObject;
@ -282,9 +283,9 @@ public class LoginWebBridge {
try {
JSONObject jo = new JSONObject(userInfo);
String status = jo.get("status").toString();
if (status.equals(LOGIN_SUCCESS)) {
if (ComparatorUtils.equals(status, LOGIN_SUCCESS)) {
String username = jo.get("username").toString();
int uid = Integer.parseInt(jo.get("uid") == null ? "" : jo.get("uid").toString());
int uid = Integer.parseInt(jo.get("uid") == null ? StringUtils.EMPTY : jo.get("uid").toString());
closeQQWindow();
loginSuccess(username);
@ -293,7 +294,7 @@ public class LoginWebBridge {
list.add(username);
list.add(StringUtils.EMPTY);
BBSLoginUtils.bbsLogin(list);
} else if (status.equals(LOGIN_FAILED)) {
} else if (ComparatorUtils.equals(status, LOGIN_FAILED)) {
//账号没有QQ授权
closeQQWindow();
try {

Loading…
Cancel
Save