我有一个标准方法,例如:
public static boolean isValidEmailAddress(String email) {
boolean result = true;
try {
InternetAddress emailAddr = new InternetAddress(email);
emailAddr.validate();
} catch (AddressException ex) {
result = false;
}
return result;
}
为什么不对 h@h、/////@h、* *@d 之类的数组进行捕获和异常处理?