Browse Source

登陆username为空时的npe问题

master
vito 9 years ago
parent
commit
0655c626ba
  1. 3
      designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java

3
designer/src/com/fr/design/mainframe/bbs/BBSLoginDialog.java

@ -279,8 +279,10 @@ public class BBSLoginDialog extends UIDialog {
* @return 同上 * @return 同上
*/ */
public static boolean login(String username, String password) { public static boolean login(String username, String password) {
if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)) {
try { try {
username = URLEncoder.encode(username, EncodeConstants.ENCODING_GBK); username = URLEncoder.encode(username, EncodeConstants.ENCODING_GBK);
password = URLEncoder.encode(password, EncodeConstants.ENCODING_GBK);
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
FRLogger.getLogger().error(e.getMessage()); FRLogger.getLogger().error(e.getMessage());
} }
@ -297,6 +299,7 @@ public class BBSLoginDialog extends UIDialog {
FRLogger.getLogger().error(e.getMessage()); FRLogger.getLogger().error(e.getMessage());
} }
} }
}
return false; return false;
} }

Loading…
Cancel
Save