try {      InternetAddress[] addresses = InternetAddress.parse (address);  if (addresses.length != 1) { throw new EmailException ("\"" + address + "\" is an improperly formed " + "email address"); }  this.emailAddress = addresses[0]; }  catch (AddressException ex) { throw new EmailException ("\"" + address + "\" is an improperly formed " + "email address", ex); }
this.emailAddress = address;
    public EmailAddress (String address)        throws EmailException    {        try        {            // The InternetAddress class in the Java Mail 1.3 API has a            // constructor that does strict parsing. But the 1.1 version            // doesn't. However, we can use the parse() method to do the            // checking; it does do strict RFC822 syntax checks.            InternetAddress[] addresses = InternetAddress.parse (address);            if (addresses.length != 1)            {                throw new EmailException ("\""                                        + address                                        + "\" is an improperly formed "                                        + "email address");            }            this.emailAddress = addresses[0];        }        catch (AddressException ex)        {            throw new EmailException ("\""                                    + address                                    + "\" is an improperly formed "                                    + "email address",                                      ex);        }    }