Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "修复:登录时因账号被封禁而导致一直报空指针异常问题 by 默非默" #64

Merged
merged 1 commit into from
Aug 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -492,13 +492,6 @@ private void processLoginInfo(String loginContent) {
LOG.info(e.getMessage());
return;
}
//add by 默非默 2017-08-01 22:28:09
//如果登录被禁止时,则登录返回的message内容不为空,下面代码则判断登录内容是否为空,不为空则退出程序
String msg = getLoginMessage(text);
if (!"".equals(msg)){
LOG.info(msg);
System.exit(0);
}
Document doc = CommonTools.xmlParser(text);
if (doc != null) {
core.getLoginInfo().put(StorageLoginInfoEnum.skey.getKey(),
Expand Down Expand Up @@ -668,17 +661,4 @@ private Map<String, String> syncCheck() {
return resultMap;
}

/**
* 解析登录返回的消息,如果成功登录,则message为空
* @param result
* @return
*/
public String getLoginMessage(String result){
String[] strArr = result.split("<message>");
String[] rs = strArr[1].split("</message>");
if (rs!=null && rs.length>1) {
return rs[0];
}
return "";
}
}