Skip to content

Commit

Permalink
Deprecated broken methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nullterminated committed Feb 14, 2013
1 parent 0eec660 commit d5f1a64
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ public Boolean call() {
* @return true if the hostName is valid, false if no hostName or MX record
* is found, null if lookup times out
* @throws NamingException
*
* @deprecated this method will throw mysterious NullPointerExceptions if used
* in a loop. Evidently, something about the DirContext is not as thread safe
* as the javadocs claim. Do not use it.
*/
public static Boolean isValidDomainString(String hostName, long timeout) {
if (timeout < 1) {
Expand Down Expand Up @@ -262,11 +266,13 @@ public static Boolean isValidDomainString(String hostName, long timeout) {
* @param def
* default value if timeout occurs
* @return true if the email passes both validations
*
* @deprecated Deprecated because it relies on {@link ERXEmailValidator#isValidDomainString(String, long)}
*/
public boolean isValidEmailAddress(String email, long timeout, boolean def) {
if (isValidEmailString(email)) {
String hostName = hostNameForEmailString(email);
Boolean value = isValidDomainString(hostName, timeout);
Boolean value = ERXEmailValidator.isValidDomainString(hostName, timeout);
return ERXValueUtilities.booleanValueWithDefault(value, def);
}
return false;
Expand Down

0 comments on commit d5f1a64

Please sign in to comment.