mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-04 13:17:50 +08:00
The method checkEmail do not have null check (#1481)
When the email is empty , it wll be nullpointexception. So i fix it with null check.
This commit is contained in:
parent
bfa3a36c92
commit
bc68d9a039
@ -53,6 +53,10 @@ public class CheckUtils {
|
||||
* @return true if email regex valid, otherwise return false
|
||||
*/
|
||||
public static boolean checkEmail(String email) {
|
||||
if (StringUtils.isEmpty(email)){
|
||||
return false;
|
||||
}
|
||||
|
||||
return email.length() > 5 && email.length() <= 40 && regexChecks(email, Constants.REGEX_MAIL_NAME) ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user