camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r653697 - in /activemq/camel/trunk/components/camel-mail/src: main/java/org/apache/camel/component/mail/ test/java/org/apache/camel/component/mail/
Date Tue, 06 May 2008 07:25:23 GMT
Author: ningjiang
Date: Tue May  6 00:25:22 2008
New Revision: 653697

URL: http://svn.apache.org/viewvc?rev=653697&view=rev
Log:
Fixed the CS errors in camel-mail component

Modified:
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java
    activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentTest.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java
    activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
Tue May  6 00:25:22 2008
@@ -18,15 +18,16 @@
 
 import java.util.Iterator;
 import java.util.Map;
+
 import javax.activation.DataHandler;
 import javax.mail.Address;
+import javax.mail.BodyPart;
 import javax.mail.Message;
 import javax.mail.MessagingException;
-import javax.mail.BodyPart;
 import javax.mail.Part;
 import javax.mail.internet.InternetAddress;
-import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeBodyPart;
+import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeMultipart;
 
 import org.apache.camel.Exchange;

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java
Tue May  6 00:25:22 2008
@@ -17,12 +17,12 @@
 package org.apache.camel.component.mail;
 
 import java.net.URI;
-import java.util.Properties;
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
 
-import javax.mail.Session;
 import javax.mail.Message;
+import javax.mail.Session;
 
 import org.springframework.mail.javamail.JavaMailSenderImpl;
 
@@ -209,7 +209,7 @@
 
     public void setUsername(String username) {
         this.username = username;
-        if (! recipients.containsKey(Message.RecipientType.TO)) {
+        if (!recipients.containsKey(Message.RecipientType.TO)) {
             // set default destination to username@host for backwards compatibility
             // can be overridden by URI parameters
             String address = username + "@" + host;

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConsumer.java
Tue May  6 00:25:22 2008
@@ -18,10 +18,10 @@
 
 import javax.mail.Flags;
 import javax.mail.Folder;
+import javax.mail.FolderNotFoundException;
 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.Store;
-import javax.mail.FolderNotFoundException;
 import javax.mail.search.FlagTerm;
 
 import org.apache.camel.Processor;
@@ -82,8 +82,8 @@
         }
 
         if (LOG.isDebugEnabled()) {
-            LOG.debug("Polling mailfolder " + folder.getFullName() + " at host " +
-                endpoint.getConfiguration().getHost() + ":" + endpoint.getConfiguration().getPort());
+            LOG.debug("Polling mailfolder " + folder.getFullName() + " at host "
+                + endpoint.getConfiguration().getHost() + ":" + endpoint.getConfiguration().getPort());
         }
 
         if (endpoint.getConfiguration().getFetchSize() == 0) {

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailMessage.java
Tue May  6 00:25:22 2008
@@ -27,9 +27,9 @@
 import javax.mail.Multipart;
 import javax.mail.Part;
 
+import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.impl.DefaultMessage;
 import org.apache.camel.util.CollectionHelper;
-import org.apache.camel.RuntimeCamelException;
 
 /**
  * Represents a {@link org.apache.camel.Message} for working with Mail
@@ -152,7 +152,7 @@
      */
     protected static void extractAttachments(Message message, Map<String, DataHandler>
map)
         throws javax.mail.MessagingException, IOException {
-        
+
         Object content = message.getContent();
         if (content instanceof Multipart) {
             // mail with attachment

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailUtils.java
Tue May  6 00:25:22 2008
@@ -18,9 +18,10 @@
 
 import java.text.DateFormat;
 import java.util.Date;
+
 import javax.mail.Address;
-import javax.mail.MessagingException;
 import javax.mail.Message;
+import javax.mail.MessagingException;
 
 /**
  * Mail utility class.

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentTest.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentTest.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailAttachmentTest.java
Tue May  6 00:25:22 2008
@@ -17,13 +17,14 @@
 package org.apache.camel.component.mail;
 
 import java.util.Map;
+
 import javax.activation.DataHandler;
 import javax.activation.FileDataSource;
 
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
-import org.apache.camel.Endpoint;
 import org.apache.camel.Producer;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeTest.java
Tue May  6 00:25:22 2008
@@ -24,8 +24,8 @@
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.springframework.mail.javamail.JavaMailSenderImpl;
 import org.jvnet.mock_javamail.Mailbox;
+import org.springframework.mail.javamail.JavaMailSenderImpl;
 
 /**
  * Unit test for fetch size.

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailFetchSizeZeroTest.java
Tue May  6 00:25:22 2008
@@ -1,14 +1,30 @@
+/**
+ * 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.
+ */
 package org.apache.camel.component.mail;
 
-import javax.mail.Store;
 import javax.mail.Folder;
 import javax.mail.Message;
+import javax.mail.Store;
 import javax.mail.internet.MimeMessage;
 
-import org.jvnet.mock_javamail.Mailbox;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.jvnet.mock_javamail.Mailbox;
 import org.springframework.mail.javamail.JavaMailSenderImpl;
 
 /**

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java?rev=653697&r1=653696&r2=653697&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java
(original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailProcessOnlyUnseenMessagesTest.java
Tue May  6 00:25:22 2008
@@ -77,7 +77,7 @@
             public void configure() throws Exception {
                 from("direct:a").to("smtp://claus@localhost");
 
-                from("imap://localhost?username=claus&password=secret&processOnlyUnseenMessages=true").to(
"mock:result");
+                from("imap://localhost?username=claus&password=secret&processOnlyUnseenMessages=true").to("mock:result");
             }
         };
     }



Mime
View raw message