You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2007/02/26 01:39:57 UTC

svn commit: r511673 - /jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java

Author: dion
Date: Sun Feb 25 16:39:56 2007
New Revision: 511673

URL: http://svn.apache.org/viewvc?view=rev&rev=511673
Log:
checkstyle fixes

Modified:
    jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java

Modified: jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java?view=diff&rev=511673&r1=511672&r2=511673
==============================================================================
--- jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java (original)
+++ jakarta/commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java Sun Feb 25 16:39:56 2007
@@ -162,6 +162,13 @@
 
     /**
      * Embeds an URL in the HTML.
+     *
+     * @param url The URL of the file.
+     * @param name The name that will be set in the filename header field.
+     * @return A String with the Content-ID of the file.
+     * @throws EmailException when URL supplied is invalid
+     *  also see javax.mail.internet.MimeBodyPart for definitions
+     *
      * @see #embed(URL, String)
      * @since 1.1
      */
@@ -373,8 +380,11 @@
      */
     private static class InlineImage
     {
+        /** content id */
         private String cid;
+        /** URL that points to the content */
         private URL url;
+        /** the <code>MimeBodyPart</code> that contains the encoded data */
         private MimeBodyPart mbp;
 
         /**
@@ -405,7 +415,8 @@
          * Returns the URL that points to the encoded content.
          * @return the URL pointing to the encoded content
          */
-        public URL getURL() {
+        public URL getURL()
+        {
             return url;
         }
 
@@ -422,17 +433,30 @@
 
         // equals()/hashCode() implementations, since this class
         // is stored as a entry in a Map.
-
+        /**
+         * {@inheritDoc}
+         * @return true if the other object is also an InlineImage with the same cid.
+         */
         public boolean equals(Object obj)
         {
-            if (this == obj) return true;
-            if (!(obj instanceof InlineImage)) return false;
+            if (this == obj)
+            {
+                return true;
+            }
+            if (!(obj instanceof InlineImage))
+            {
+                return false;
+            }
 
             InlineImage that = (InlineImage) obj;
 
             return this.cid.equals(that.cid);
         }
 
+        /**
+         * {@inheritDoc}
+         * @return the cid hashCode.
+         */
         public int hashCode()
         {
             return cid.hashCode();



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org