You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by sg...@apache.org on 2009/06/08 00:02:58 UTC
svn commit: r782475 - in /commons/proper/email/trunk: ./
src/java/org/apache/commons/mail/ xdocs/style/
Author: sgoeschl
Date: Sun Jun 7 22:02:58 2009
New Revision: 782475
URL: http://svn.apache.org/viewvc?rev=782475&view=rev
Log:
Goinf through RAT and checkstyle issues (aka release gymnastic)
Modified:
commons/proper/email/trunk/NOTICE.txt
commons/proper/email/trunk/pom.xml
commons/proper/email/trunk/src/java/org/apache/commons/mail/ByteArrayDataSource.java
commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java
commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java
commons/proper/email/trunk/src/java/org/apache/commons/mail/HtmlEmail.java
commons/proper/email/trunk/xdocs/style/project.css
Modified: commons/proper/email/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/NOTICE.txt?rev=782475&r1=782474&r2=782475&view=diff
==============================================================================
--- commons/proper/email/trunk/NOTICE.txt (original)
+++ commons/proper/email/trunk/NOTICE.txt Sun Jun 7 22:02:58 2009
@@ -1,5 +1,5 @@
Apache Commons Email
-Copyright 2001-2007 The Apache Software Foundation
+Copyright 2001-2009 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
Modified: commons/proper/email/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/pom.xml?rev=782475&r1=782474&r2=782475&view=diff
==============================================================================
--- commons/proper/email/trunk/pom.xml (original)
+++ commons/proper/email/trunk/pom.xml Sun Jun 7 22:02:58 2009
@@ -27,7 +27,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>commons-email</groupId>
<artifactId>commons-email</artifactId>
- <version>1.2-SNAPSHOT</version>
+ <version>1.2</version>
<name>Commons Email</name>
<inceptionYear>2001</inceptionYear>
Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/ByteArrayDataSource.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/java/org/apache/commons/mail/ByteArrayDataSource.java?rev=782475&r1=782474&r2=782475&view=diff
==============================================================================
--- commons/proper/email/trunk/src/java/org/apache/commons/mail/ByteArrayDataSource.java (original)
+++ commons/proper/email/trunk/src/java/org/apache/commons/mail/ByteArrayDataSource.java Sun Jun 7 22:02:58 2009
@@ -68,10 +68,6 @@
bis = new ByteArrayInputStream(data);
this.byteArrayDataSource(bis, aType);
}
- catch (IOException ioex)
- {
- throw ioex;
- }
finally
{
if (bis != null)
@@ -163,10 +159,6 @@
osWriter.close();
}
- catch (IOException ioex)
- {
- throw ioex;
- }
finally
{
if (bis != null)
Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java?rev=782475&r1=782474&r2=782475&view=diff
==============================================================================
--- commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java (original)
+++ commons/proper/email/trunk/src/java/org/apache/commons/mail/Email.java Sun Jun 7 22:02:58 2009
@@ -105,7 +105,7 @@
/** */
public static final String MAIL_SMTP_SOCKET_FACTORY_PORT = "mail.smtp.socketFactory.port";
-
+
/**
* Socket connection timeout value in milliseconds. Default is infinite timeout.
* @since 1.2
@@ -114,7 +114,7 @@
/**
* Socket I/O timeout value in milliseconds. Default is infinite timeout.
- * @since 1.2
+ * @since 1.2
*/
public static final String MAIL_SMTP_TIMEOUT = "mail.smtp.timeout";
@@ -438,7 +438,7 @@
public void setMailSession(Session aSession)
{
EmailUtils.notNull(aSession, "no mail session supplied");
-
+
Properties sessionProperties = aSession.getProperties();
String auth = sessionProperties.getProperty(MAIL_SMTP_AUTH);
@@ -447,7 +447,7 @@
String userName = sessionProperties.getProperty(MAIL_SMTP_USER);
String password = sessionProperties.getProperty(MAIL_SMTP_PASSWORD);
- if(EmailUtils.isNotEmpty(userName) && EmailUtils.isNotEmpty(password))
+ if (EmailUtils.isNotEmpty(userName) && EmailUtils.isNotEmpty(password))
{
// only create a new mail session with an authenticator if
// authentication is required and no user name is given
@@ -457,7 +457,7 @@
else
{
// assume that the given mail session contains a working authenticator
- this.session = aSession;
+ this.session = aSession;
}
}
else
@@ -543,7 +543,7 @@
if (this.socketTimeout > 0)
{
- properties.setProperty(MAIL_SMTP_TIMEOUT, Integer.toString(this.socketTimeout));
+ properties.setProperty(MAIL_SMTP_TIMEOUT, Integer.toString(this.socketTimeout));
}
if (this.socketConnectionTimeout > 0)
@@ -616,7 +616,7 @@
* Set the FROM field of the email to use the specified address. The email
* address will also be used as the personal name.
* The name will be encoded by the charset of {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -633,9 +633,9 @@
/**
* Set the FROM field of the email to use the specified address and the
- * specified personal name.
+ * specified personal name.
* The name will be encoded by the charset of {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -674,7 +674,7 @@
* address will also be used as the personal name.
* The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -694,7 +694,7 @@
* specified personal name.
* The name will be encoded by the charset of
* {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -754,7 +754,7 @@
* Add a recipient CC to the email. The email
* address will also be used as the personal name.
* The name will be encoded by the charset of {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -773,7 +773,7 @@
* Add a recipient CC to the email using the specified address and the
* specified personal name.
* The name will be encoded by the charset of {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -833,7 +833,7 @@
* Add a blind BCC recipient to the email. The email
* address will also be used as the personal name.
* The name will be encoded by the charset of {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -852,7 +852,7 @@
* Add a blind BCC recipient to the email using the specified address and
* the specified personal name.
* The name will be encoded by the charset of {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -912,7 +912,7 @@
* Add a reply to address to the email. The email
* address will also be used as the personal name.
* The name will be encoded by the charset of {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -931,7 +931,7 @@
* Add a reply to address to the email using the specified address and
* the specified personal name.
* The name will be encoded by the charset of {@link #setCharset(java.lang.String) setCharset()}.
- * If it is not set, it will be encoded using
+ * If it is not set, it will be encoded using
* the Java platform's default charset (UTF-16) if it contains
* non-ASCII characters; otherwise, it is used as is.
*
@@ -1110,7 +1110,7 @@
// update content type (and encoding)
this.updateContentType(this.contentType);
-
+
if (this.content != null)
{
this.message.setContent(this.content, this.contentType);
@@ -1215,7 +1215,7 @@
{
return new MimeMessage(aSession);
}
-
+
/**
* Sends the previously created MimeMessage to the SMTP server.
*
@@ -1443,7 +1443,7 @@
{
this.sslSmtpPort = sslSmtpPort;
}
-
+
/**
* Get the list of "To" addresses.
*
@@ -1502,7 +1502,7 @@
* @param socketConnectionTimeout the connection timeout
* @since 1.2
*/
- public void setSocketConnectionTimeout( int socketConnectionTimeout )
+ public void setSocketConnectionTimeout(int socketConnectionTimeout)
{
this.socketConnectionTimeout = socketConnectionTimeout;
}
@@ -1525,7 +1525,7 @@
* @param socketTimeout the socket I/O timeout
* @since 1.2
*/
- public void setSocketTimeout( int socketTimeout )
+ public void setSocketTimeout(int socketTimeout)
{
this.socketTimeout = socketTimeout;
}
Modified: commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java?rev=782475&r1=782474&r2=782475&view=diff
==============================================================================
--- commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java (original)
+++ commons/proper/email/trunk/src/java/org/apache/commons/mail/EmailUtils.java Sun Jun 7 22:02:58 2009
@@ -235,25 +235,25 @@
* @throws IOException writing the MimeMessage failed
* @throws MessagingException writing the MimeMessage failed
*/
- static void writeMimeMessage( File resultFile, MimeMessage mimeMessage) throws IOException, MessagingException
+ static void writeMimeMessage(File resultFile, MimeMessage mimeMessage) throws IOException, MessagingException
{
FileOutputStream fos = null;
- if(mimeMessage == null)
+ if (mimeMessage == null)
{
- throw new IllegalArgumentException( "mimeMessage is null");
+ throw new IllegalArgumentException("mimeMessage is null");
}
- if(resultFile == null)
+ if (resultFile == null)
{
- throw new IllegalArgumentException( "resulFile is null");
+ throw new IllegalArgumentException("resulFile is null");
}
- if(resultFile.getParentFile() != null)
+ if (resultFile.getParentFile() != null)
{
resultFile.getParentFile().mkdirs();
}
-
+
try
{
fos = new FileOutputStream(resultFile);
@@ -264,14 +264,14 @@
}
finally
{
- if(fos != null)
+ if (fos != null)
{
try
{
fos.close();
fos = null;
}
- catch( Exception e )
+ catch (Exception e)
{
// ignore
}
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=782475&r1=782474&r2=782475&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 Sun Jun 7 22:02:58 2009
@@ -527,16 +527,16 @@
BodyPart msgText = null;
rootContainer.setSubType("mixed");
-
+
// determine how to form multiparts of email
-
- if (EmailUtils.isNotEmpty(this.html) && this.inlineEmbeds.size()>0)
+
+ if (EmailUtils.isNotEmpty(this.html) && this.inlineEmbeds.size() > 0)
{
//If HTML body and embeds are used, create a related container and add it to the root container
bodyEmbedsContainer = new MimeMultipart("related");
bodyContainer = bodyEmbedsContainer;
this.addPart(bodyEmbedsContainer, 0);
-
+
//If TEXT body was specified, create a alternative container and add it to the embeds container
if (EmailUtils.isNotEmpty(this.text))
{
Modified: commons/proper/email/trunk/xdocs/style/project.css
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/xdocs/style/project.css?rev=782475&r1=782474&r2=782475&view=diff
==============================================================================
--- commons/proper/email/trunk/xdocs/style/project.css (original)
+++ commons/proper/email/trunk/xdocs/style/project.css Sun Jun 7 22:02:58 2009
@@ -1 +1,17 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
@import url("http://commons.apache.org/style/commons-maven.css");