commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1417154 - in /commons/proper/email/trunk/src/main/java/org/apache/commons/mail: ./ resolver/ util/
Date Tue, 04 Dec 2012 20:27:57 GMT
Author: tn
Date: Tue Dec  4 20:27:55 2012
New Revision: 1417154

URL: http://svn.apache.org/viewvc?rev=1417154&view=rev
Log:
Fix checkstyle warnings.

Modified:
    commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java
    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/MultiPartEmail.java
    commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceClassPathResolver.java
    commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceCompositeResolver.java
    commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceFileResolver.java
    commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceUrlResolver.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/ByteArrayDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java?rev=1417154&r1=1417153&r2=1417154&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java
(original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/ByteArrayDataSource.java
Tue Dec  4 20:27:55 2012
@@ -49,7 +49,7 @@ public class ByteArrayDataSource impleme
     private ByteArrayOutputStream baos;
 
     /** The Content-type. */
-    private final String type;// = "application/octet-stream";
+    private final String type; // = "application/octet-stream";
 
     /**
      * Create a datasource from a byte array.

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=1417154&r1=1417153&r2=1417154&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 Tue Dec  4
20:27:55 2012
@@ -664,16 +664,16 @@ public abstract class Email implements E
     public Email addTo(String... emails)
         throws EmailException
     {
-        if(emails == null || emails.length == 0)
+        if (emails == null || emails.length == 0)
         {
             throw new EmailException("Address List provided was invalid");
         }
-        
-        for(String email : emails)
+
+        for (String email : emails)
         {
             addTo(email, null);
         }
-        
+
         return this;
     }
 
@@ -773,16 +773,16 @@ public abstract class Email implements E
     public Email addCc(String... emails)
         throws EmailException
     {
-        if(emails == null || emails.length == 0)
+        if (emails == null || emails.length == 0)
         {
             throw new EmailException("Address List provided was invalid");
         }
-        
-        for(String email : emails)
+
+        for (String email : emails)
         {
             addCc(email, null);
         }
-        
+
         return this;
     }
 
@@ -881,16 +881,16 @@ public abstract class Email implements E
     public Email addBcc(String... emails)
         throws EmailException
     {
-        if(emails == null || emails.length == 0)
+        if (emails == null || emails.length == 0)
         {
             throw new EmailException("Address List provided was invalid");
         }
-        
-        for(String email : emails)
+
+        for (String email : emails)
         {
             addBcc(email, null);
         }
-        
+
         return this;
     }
 

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=1417154&r1=1417153&r2=1417154&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 Tue
Dec  4 20:27:55 2012
@@ -48,10 +48,12 @@ public class ImageHtmlEmail extends Html
     // can be arbitrary text between "IMG" and "SRC" like IDs and other things.
 
     /** regexp for extracting <img> tags */
-    public static final String REGEX_IMG_SRC = "(<[Ii][Mm][Gg]\\s*[^>]*?\\s+[Ss][Rr][Cc]\\s*=\\s*[\"'])([^\"']+?)([\"'])";
+    public static final String REGEX_IMG_SRC =
+            "(<[Ii][Mm][Gg]\\s*[^>]*?\\s+[Ss][Rr][Cc]\\s*=\\s*[\"'])([^\"']+?)([\"'])";
 
     /** regexp for extracting <script> tags */
-    public static final String REGEX_SCRIPT_SRC = "(<[Ss][Cc][Rr][Ii][Pp][Tt]\\s*.*?\\s+[Ss][Rr][Cc]\\s*=\\s*[\"'])([^\"']+?)([\"'])";
+    public static final String REGEX_SCRIPT_SRC =
+            "(<[Ss][Cc][Rr][Ii][Pp][Tt]\\s*.*?\\s+[Ss][Rr][Cc]\\s*=\\s*[\"'])([^\"']+?)([\"'])";
 
     // this pattern looks for the HTML image tag which indicates embedded images,
     // the grouping is necessary to allow to replace the element with the CID

Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java?rev=1417154&r1=1417153&r2=1417154&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java (original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/MultiPartEmail.java Tue
Dec  4 20:27:55 2012
@@ -433,7 +433,7 @@ public class MultiPartEmail extends Emai
                 // close the input stream to prevent file locking on windows
                 is.close();
             }
-            
+
             if (is == null)
             {
                 throw new EmailException("Invalid Datasource");

Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceClassPathResolver.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceClassPathResolver.java?rev=1417154&r1=1417153&r2=1417154&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceClassPathResolver.java
(original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceClassPathResolver.java
Tue Dec  4 20:27:55 2012
@@ -71,11 +71,13 @@ public class DataSourceClassPathResolver
         return classPathBase;
     }
 
+    /** {@inheritDoc} */
     public DataSource resolve(String resourceLocation) throws IOException
     {
         return resolve(resourceLocation, isLenient());
     }
 
+    /** {@inheritDoc} */
     public DataSource resolve(final String resourceLocation, final boolean isLenient) throws
IOException
     {
         DataSource result = null;
@@ -121,6 +123,13 @@ public class DataSourceClassPathResolver
         }
     }
 
+    /**
+     * Returns the resource name for a given resource location.
+     *
+     * @param resourceLocation the resource location
+     * @return {@link #getClassPathBase()} + {@code resourceLocation}
+     * @see #getClassPathBase()
+     */
     private String getResourceName(final String resourceLocation)
     {
         return (getClassPathBase() + resourceLocation).replaceAll("//", "/");

Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceCompositeResolver.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceCompositeResolver.java?rev=1417154&r1=1417153&r2=1417154&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceCompositeResolver.java
(original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceCompositeResolver.java
Tue Dec  4 20:27:55 2012
@@ -69,6 +69,7 @@ public class DataSourceCompositeResolver
         return resolvers;
     }
 
+    /** {@inheritDoc} */
     public DataSource resolve(String resourceLocation) throws IOException
     {
         DataSource result = resolve(resourceLocation, true);
@@ -84,6 +85,7 @@ public class DataSourceCompositeResolver
 
     }
 
+    /** {@inheritDoc} */
     public DataSource resolve(final String resourceLocation, final boolean isLenient) throws
IOException
     {
         for (int i = 0; i < getDataSourceResolvers().length; i++)

Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceFileResolver.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceFileResolver.java?rev=1417154&r1=1417153&r2=1417154&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceFileResolver.java
(original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceFileResolver.java
Tue Dec  4 20:27:55 2012
@@ -72,11 +72,13 @@ public class DataSourceFileResolver exte
         return baseDir;
     }
 
+    /** {@inheritDoc} */
     public DataSource resolve(final String resourceLocation) throws IOException
     {
         return resolve(resourceLocation, isLenient());
     }
 
+    /** {@inheritDoc} */
     public DataSource resolve(final String resourceLocation, final boolean isLenient) throws
IOException
     {
         File file;

Modified: commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceUrlResolver.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceUrlResolver.java?rev=1417154&r1=1417153&r2=1417154&view=diff
==============================================================================
--- commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceUrlResolver.java
(original)
+++ commons/proper/email/trunk/src/main/java/org/apache/commons/mail/resolver/DataSourceUrlResolver.java
Tue Dec  4 20:27:55 2012
@@ -65,11 +65,13 @@ public class DataSourceUrlResolver exten
         return baseUrl;
     }
 
+    /** {@inheritDoc} */
     public DataSource resolve(String resourceLocation) throws IOException
     {
         return resolve(resourceLocation, isLenient());
     }
 
+    /** {@inheritDoc} */
     public DataSource resolve(final String resourceLocation, final boolean isLenient) throws
IOException
     {
         DataSource result = null;

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=1417154&r1=1417153&r2=1417154&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
Tue Dec  4 20:27:55 2012
@@ -156,9 +156,9 @@ public final class MimeMessageUtils
 
         try
         {
-            if(!resultFile.getParentFile().exists())
+            if (!resultFile.getParentFile().exists())
             {
-                if(!resultFile.getParentFile().mkdirs())
+                if (!resultFile.getParentFile().mkdirs())
                 {
                     throw new IOException("Failed to created the following parent directories
: " + resultFile.getParentFile());
                 }



Mime
View raw message