commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1418977 - in /commons/proper/email/trunk/src/main/java/org/apache/commons/mail: Email.java ImageHtmlEmail.java util/MimeMessageUtils.java
Date Sun, 09 Dec 2012 14:34:46 GMT
Author: tn
Date: Sun Dec  9 14:34:45 2012
New Revision: 1418977

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

Modified:
    commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java
    commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ImageHtmlEmail.java
    commons/proper/email/trunk/src/main/java/org/apache/commons/mail/util/MimeMessageUtils.java

Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java?rev=1418977&r1=1418976&r2=1418977&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/Email.java Sun Dec  9
14:34:45 2012
@@ -165,6 +165,19 @@ public abstract class Email implements E
     protected boolean tls;
 
     /**
+     * Does the current transport use SSL/TLS encryption upon connection?
+     * @deprecated since 1.3, use setSSLOnConnect() instead
+     */
+    @Deprecated
+    protected boolean ssl;
+
+    /** socket I/O timeout value in milliseconds. */
+    protected int socketTimeout = SOCKET_TIMEOUT_MS;
+
+    /** socket connection timeout value in milliseconds. */
+    protected int socketConnectionTimeout = SOCKET_TIMEOUT_MS;
+
+    /**
      * If true, enables the use of the STARTTLS command (if supported by
      * the server) to switch the connection to a TLS-protected connection
      * before issuing any login commands. Note that an appropriate trust
@@ -182,13 +195,6 @@ public abstract class Email implements E
      */
     private boolean startTlsRequired;
 
-    /**
-     * Does the current transport use SSL/TLS encryption upon connection?
-     * @deprecated since 1.3, use setSSLOnConnect() instead
-     */
-    @Deprecated
-    protected boolean ssl;
-
     /** does the current transport use SSL/TLS encryption upon connection? */
     private boolean sslOnConnect;
 
@@ -200,12 +206,6 @@ public abstract class Email implements E
      */
     private boolean sslCheckServerIdentity;
 
-    /** socket I/O timeout value in milliseconds. */
-    protected int socketTimeout = SOCKET_TIMEOUT_MS;
-
-    /** socket connection timeout value in milliseconds. */
-    protected int socketConnectionTimeout = SOCKET_TIMEOUT_MS;
-
     /** The Session to mail with. */
     private Session session;
 

Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ImageHtmlEmail.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ImageHtmlEmail.java?rev=1418977&r1=1418976&r2=1418977&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ImageHtmlEmail.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ImageHtmlEmail.java Sun
Dec  9 14:34:45 2012
@@ -64,6 +64,9 @@ public class ImageHtmlEmail extends Html
     /** pattern for extracting <script> tags */
     private static final Pattern SCRIPT_PATTERN = Pattern.compile(REGEX_SCRIPT_SRC);
 
+    /** the group of the remaining chars after the src attribute */
+    private static final int LAST_GROUP = 3;
+
     /** resolve the images and script resources to a DataSource */
     private DataSourceResolver dataSourceResolver;
 
@@ -171,7 +174,7 @@ public class ImageHtmlEmail extends Html
                 // if we embedded something, then we need to replace the URL with
                 // the CID, otherwise the Matcher takes care of adding the
                 // non-replaced text afterwards, so no else is necessary here!
-                matcher.appendReplacement(stringBuffer, matcher.group(1) + "cid:" + cid +
matcher.group(3));
+                matcher.appendReplacement(stringBuffer, matcher.group(1) + "cid:" + cid +
matcher.group(LAST_GROUP));
             }
         }
 

Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/util/MimeMessageUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/util/MimeMessageUtils.java?rev=1418977&r1=1418976&r2=1418977&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/util/MimeMessageUtils.java
(original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/util/MimeMessageUtils.java
Sun Dec  9 14:34:45 2012
@@ -160,7 +160,9 @@ public final class MimeMessageUtils
             {
                 if (!resultFile.getParentFile().mkdirs())
                 {
-                    throw new IOException("Failed to created the following parent directories
: " + resultFile.getParentFile());
+                    throw new IOException(
+                            "Failed to create the following parent directories: "
+                                    + resultFile.getParentFile());
                 }
             }
 



Mime
View raw message