Author: norman Date: Wed Jan 10 08:57:24 2007 New Revision: 494893 URL: http://svn.apache.org/viewvc?view=rev&rev=494893 Log: Check for syntax if new MailAddress(user,domain) is used. See JAMES-757
Modified: james/server/trunk/src/java/org/apache/mailet/MailAddress.java Modified: james/server/trunk/src/java/org/apache/mailet/MailAddress.java URL: http://svn.apache.org/viewvc/james/server/trunk/src/java/org/apache/mailet/MailAddress.java?view=diff&rev=494893&r1=494892&r2=494893 ============================================================================== --- james/server/trunk/src/java/org/apache/mailet/MailAddress.java (original) +++ james/server/trunk/src/java/org/apache/mailet/MailAddress.java Wed Jan 10 08:57:24 2007 @@ -171,9 +171,7 @@ * @throws ParseException if the parse failed */ public MailAddress(String newUser, String newHost) throws ParseException { - /* NEEDS TO BE REWORKED TO VALIDATE EACH CHAR */ - user = newUser; - host = newHost; + this(newUser+ "@" + newHost); } /** @@ -218,6 +216,12 @@ return addressBuffer.toString(); } + + /** + * Return MailAddress as InternetAddress + * + * @return the address + */ public InternetAddress toInternetAddress() { try { return new InternetAddress(toString()); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]