Author: sgoeschl Date: Tue Jun 16 20:36:22 2009 New Revision: 785383 URL: http://svn.apache.org/viewvc?rev=785383&view=rev Log: [EMAIL-87] Updated the comments
Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java?rev=785383&r1=785382&r2=785383&view=diff ============================================================================== --- commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java (original) +++ commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java Tue Jun 16 20:36:22 2009 @@ -266,6 +266,9 @@ URLDataSource urlDataSource = (URLDataSource) ii.getDataSource(); // make sure the supplied URL points to the same thing // as the one already associated with this name. + // NOTE: Comparing URLs with URL.equals() is a blocking operation + // in the case of a network failure therefore we use + // url.toExternalForm().equals() here. if (url.toExternalForm().equals(urlDataSource.getURL().toExternalForm())) { return ii.getCid(); @@ -276,10 +279,6 @@ + "' is already bound to URL " + urlDataSource.getURL() + "; existing names cannot be rebound"); } - // NOTE: Comparing URLs with URL.equals() is known to be - // inconsistent when dealing with virtual hosting over HTTP, - // but since these are almost always files on the local machine, - // using equals() should be sufficient. } // verify that the URL is valid