camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r563665 [7/11] - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/converter/jaxp/ camel-core/src/test/java/org/apache/camel/processor/ components/camel-activemq/src/main/java/org/apache/camel/component/activemq/ component...
Date Tue, 07 Aug 2007 21:33:12 GMT
Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/JavaMailConnection.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/JavaMailConnection.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/JavaMailConnection.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/JavaMailConnection.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,20 +16,17 @@
  */
 package org.apache.camel.component.mail;
 
-import org.springframework.mail.MailAuthenticationException;
-import org.springframework.mail.MailException;
-import org.springframework.mail.MailSendException;
-import org.springframework.mail.javamail.JavaMailSenderImpl;
-
-import javax.mail.AuthenticationFailedException;
-import javax.mail.MessagingException;
-import javax.mail.Transport;
 import javax.mail.Folder;
+import javax.mail.MessagingException;
 import javax.mail.Store;
 
+import org.springframework.mail.MailSendException;
+import org.springframework.mail.javamail.JavaMailSenderImpl;
+
 /**
- * An extension of Spring's {@link JavaMailSenderImpl} to provide helper methods for listening for new mail
- *
+ * An extension of Spring's {@link JavaMailSenderImpl} to provide helper methods
+ * for listening for new mail
+ * 
  * @version $Revision: 1.1 $
  */
 public class JavaMailConnection extends JavaMailSenderImpl {
@@ -40,8 +36,7 @@
             Store store = getSession().getStore(protocol);
             store.connect(getHost(), getPort(), getUsername(), getPassword());
             return store.getFolder(folderName);
-        }
-        catch (MessagingException e) {
+        } catch (MessagingException e) {
             throw new MailSendException("Mail server connection failed", e);
         }
     }

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?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- 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 Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,22 +16,23 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.Exchange;
-import org.apache.camel.converter.ObjectConverter;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
 
 import javax.mail.Address;
 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.converter.ObjectConverter;
 
 /**
- * A Strategy used to convert between a Camel {@Exchange} and {@Message} to and from a
- * Mail {@link MimeMessage}
- *
+ * A Strategy used to convert between a Camel {@Exchange} and {@Message} to and
+ * from a Mail {@link MimeMessage}
+ * 
  * @version $Revision: 521240 $
  */
 public class MailBinding {
@@ -51,8 +51,7 @@
                 mimeMessage.setFrom(new InternetAddress(from));
             }
             mimeMessage.setText(exchange.getIn().getBody(String.class));
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw new RuntimeMailException("Failed to populate body due to: " + e + ". Exchange: " + exchange, e);
         }
     }
@@ -63,15 +62,14 @@
 
     /**
      * Extracts the body from the Mail message
-     *
+     * 
      * @param exchange
      * @param message
      */
     public Object extractBodyFromMail(MailExchange exchange, Message message) {
         try {
             return message.getContent();
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw new RuntimeMailException("Failed to extract body due to: " + e + ". Message: " + message, e);
         }
     }
@@ -94,8 +92,7 @@
                             Object value = iter.next();
                             mimeMessage.addHeader(headerName, asString(exchange, value));
                         }
-                    }
-                    else {
+                    } else {
                         mimeMessage.setHeader(headerName, asString(exchange, headerValue));
                     }
                 }

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailComponent.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,21 +16,33 @@
  */
 package org.apache.camel.component.mail;
 
+import java.net.URI;
+import java.util.Map;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.util.IntrospectionSupport;
 
-import java.util.Map;
-import java.net.URI;
-import java.net.URL;
-
 /**
  * @version $Revision:520964 $
  */
 public class MailComponent extends DefaultComponent<MailExchange> {
     private MailConfiguration configuration;
 
+    public MailComponent() {
+        this.configuration = new MailConfiguration();
+    }
+
+    public MailComponent(MailConfiguration configuration) {
+        this.configuration = configuration;
+    }
+
+    public MailComponent(CamelContext context) {
+        super(context);
+        this.configuration = new MailConfiguration();
+    }
+
     /**
      * Static builder method
      */
@@ -44,19 +55,6 @@
      */
     public static MailComponent mailComponent(MailConfiguration configuration) {
         return new MailComponent(configuration);
-    }
-
-    public MailComponent() {
-        this.configuration = new MailConfiguration();
-    }
-
-    public MailComponent(MailConfiguration configuration) {
-        this.configuration = configuration;
-    }
-
-    public MailComponent(CamelContext context) {
-        super(context);
-        this.configuration = new MailConfiguration();
     }
 
     @Override

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?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- 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 Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,15 +16,16 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.RuntimeCamelException;
-
-import javax.mail.Session;
 import java.net.URI;
 import java.util.Properties;
 
+import javax.mail.Session;
+
+import org.apache.camel.RuntimeCamelException;
+
 /**
  * Represents the configuration data for communicating over email
- *
+ * 
  * @version $Revision: 532790 $
  */
 public class MailConfiguration implements Cloneable {
@@ -50,9 +50,8 @@
      */
     public MailConfiguration copy() {
         try {
-            return (MailConfiguration) clone();
-        }
-        catch (CloneNotSupportedException e) {
+            return (MailConfiguration)clone();
+        } catch (CloneNotSupportedException e) {
             throw new RuntimeCamelException(e);
         }
     }
@@ -84,8 +83,7 @@
         String fragment = uri.getFragment();
         if (fragment == null || fragment.length() == 0) {
             fragment = userInfo + "@" + host;
-        }
-        else {
+        } else {
             setFolderName(fragment);
         }
         setDestination(fragment);
@@ -96,7 +94,7 @@
         if (defaultEncoding != null) {
             answer.setDefaultEncoding(defaultEncoding);
         }
-        //answer.setDefaultFileTypeMap(fileTypeMap);
+        // answer.setDefaultFileTypeMap(fileTypeMap);
         if (host != null) {
             answer.setHost(host);
         }
@@ -122,7 +120,7 @@
     }
 
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
 
     public String getDefaultEncoding() {
         return defaultEncoding;

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?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- 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 Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,28 +16,26 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.Consumer;
-import org.apache.camel.Processor;
-import org.apache.camel.impl.ScheduledPollConsumer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import javax.mail.Flags;
 import javax.mail.Folder;
 import javax.mail.Message;
 import javax.mail.MessagingException;
-import javax.mail.Transport;
 import javax.mail.event.MessageCountEvent;
 import javax.mail.event.MessageCountListener;
 
+import org.apache.camel.Processor;
+import org.apache.camel.impl.ScheduledPollConsumer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
- * A {@link Consumer} which consumes messages from JavaMail using a {@link Transport} and dispatches them
- * to the {@link Processor}
- *
+ * A {@link Consumer} which consumes messages from JavaMail using a
+ * {@link Transport} and dispatches them to the {@link Processor}
+ * 
  * @version $Revision: 523430 $
  */
 public class MailConsumer extends ScheduledPollConsumer<MailExchange> implements MessageCountListener {
-    private static final transient Log log = LogFactory.getLog(MailConsumer.class);
+    private static final transient Log LOG = LogFactory.getLog(MailConsumer.class);
     private final MailEndpoint endpoint;
     private final Folder folder;
 
@@ -71,8 +68,7 @@
 
                     flagMessageDeleted(message);
                 }
-            }
-            catch (MessagingException e) {
+            } catch (MessagingException e) {
                 handleException(e);
             }
         }
@@ -81,12 +77,11 @@
     public void messagesRemoved(MessageCountEvent event) {
         Message[] messages = event.getMessages();
         for (Message message : messages) {
-            if (log.isDebugEnabled()) {
+            if (LOG.isDebugEnabled()) {
                 try {
-                    log.debug("Removing message: " + message.getSubject());
-                }
-                catch (MessagingException e) {
-                    log.debug("Ignored: " + e);
+                    LOG.debug("Removing message: " + message.getSubject());
+                } catch (MessagingException e) {
+                    LOG.debug("Ignored: " + e);
                 }
             }
         }
@@ -100,8 +95,7 @@
             Message[] messages = folder.getMessages();
             MessageCountEvent event = new MessageCountEvent(folder, MessageCountEvent.ADDED, true, messages);
             messagesAdded(event);
-        }
-        else if (count == -1) {
+        } else if (count == -1) {
             throw new MessagingException("Folder: " + folder.getFullName() + " is closed");
         }
 
@@ -112,8 +106,7 @@
         try {
             MailExchange exchange = endpoint.createExchange(message);
             getProcessor().process(exchange);
-        }
-        catch (Throwable e) {
+        } catch (Throwable e) {
             handleException(e);
         }
     }
@@ -127,8 +120,7 @@
     protected void flagMessageDeleted(Message message) throws MessagingException {
         if (endpoint.getConfiguration().isDeleteProcessedMessages()) {
             message.setFlag(Flags.Flag.DELETED, true);
-        }
-        else {
+        } else {
             message.setFlag(Flags.Flag.SEEN, true);
         }
     }

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConverters.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,14 +16,15 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.Converter;
+import java.io.IOException;
 
 import javax.mail.BodyPart;
 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.Multipart;
 import javax.mail.internet.MimeMultipart;
-import java.io.IOException;
+
+import org.apache.camel.Converter;
 
 /**
  * @version $Revision: 1.1 $
@@ -57,7 +57,8 @@
 
     @Converter
     public static String toString(Multipart multipart) throws MessagingException, IOException {
-        for (int i = 0, size = multipart.getCount(); i < size; i++) {
+        int size = multipart.getCount();
+        for (int i = 0; i < size; i++) {
             BodyPart part = multipart.getBodyPart(i);
             if (part.getContentType().startsWith("text")) {
                 return part.getContent().toString();

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailEndpoint.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,14 +16,15 @@
  */
 package org.apache.camel.component.mail;
 
+import javax.mail.Folder;
+import javax.mail.Message;
+
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.ScheduledPollEndpoint;
-import org.springframework.mail.javamail.JavaMailSender;
 
-import javax.mail.Message;
-import javax.mail.Folder;
+import org.springframework.mail.javamail.JavaMailSender;
 
 /**
  * @version $Revision:520964 $
@@ -33,7 +33,7 @@
     private MailBinding binding;
     private MailConfiguration configuration;
 
-    public MailEndpoint(String uri, MailComponent component,  MailConfiguration configuration) {
+    public MailEndpoint(String uri, MailComponent component, MailConfiguration configuration) {
         super(uri, component);
         this.configuration = configuration;
     }
@@ -66,7 +66,7 @@
 
     /**
      * Creates a consumer using the given processor and transport
-     *
+     * 
      * @param processor the processor to use to process the messages
      * @param folder the JavaMail Folder to use for inbound messages
      * @return a newly created consumer
@@ -87,7 +87,7 @@
     }
 
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     public MailBinding getBinding() {
         if (binding == null) {
             binding = new MailBinding();
@@ -96,17 +96,18 @@
     }
 
     /**
-     * Sets the binding used to convert from a Camel message to and from a Mail message
-     *
+     * Sets the binding used to convert from a Camel message to and from a Mail
+     * message
+     * 
      * @param binding the binding to use
      */
     public void setBinding(MailBinding binding) {
         this.binding = binding;
     }
 
-	public boolean isSingleton() {
-		return false;
-	}
+    public boolean isSingleton() {
+        return false;
+    }
 
     public MailConfiguration getConfiguration() {
         return configuration;

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailExchange.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailExchange.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailExchange.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,11 +16,11 @@
  */
 package org.apache.camel.component.mail;
 
+import javax.mail.Message;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultExchange;
-
-import javax.mail.Message;
 
 /**
  * Represents an {@ilnk Exchange} for working with Mail

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?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- 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 Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,18 +16,19 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.impl.DefaultMessage;
-import org.apache.camel.util.CollectionHelper;
+import java.util.Enumeration;
+import java.util.Map;
 
 import javax.mail.Header;
 import javax.mail.Message;
 import javax.mail.MessagingException;
-import java.util.Enumeration;
-import java.util.Map;
+
+import org.apache.camel.impl.DefaultMessage;
+import org.apache.camel.util.CollectionHelper;
 
 /**
  * Represents a {@link org.apache.camel.Message} for working with Mail
- *
+ * 
  * @version $Revision:520964 $
  */
 public class MailMessage extends DefaultMessage {
@@ -45,26 +45,25 @@
     public String toString() {
         if (mailMessage != null) {
             return "MailMessage: " + mailMessage;
-        }
-        else {
+        } else {
             return "MailMessage: " + getBody();
         }
     }
 
     @Override
     public MailExchange getExchange() {
-        return (MailExchange) super.getExchange();
+        return (MailExchange)super.getExchange();
     }
 
     public MailMessage copy() {
-        MailMessage answer = (MailMessage) super.copy();
+        MailMessage answer = (MailMessage)super.copy();
         answer.mailMessage = mailMessage;
         return answer;
     }
 
     /**
      * Returns the underlying Mail message
-     *
+     * 
      * @return the underlying Mail message
      */
     public Message getMessage() {
@@ -80,8 +79,7 @@
         if (mailMessage != null) {
             try {
                 answer = mailMessage.getHeader(name);
-            }
-            catch (MessagingException e) {
+            } catch (MessagingException e) {
                 throw new MessageHeaderAccessException(name, e);
             }
         }
@@ -113,19 +111,17 @@
             Enumeration names;
             try {
                 names = mailMessage.getAllHeaders();
-            }
-            catch (MessagingException e) {
+            } catch (MessagingException e) {
                 throw new MessageHeaderNamesAccessException(e);
             }
             try {
                 while (names.hasMoreElements()) {
-                    Header header = (Header) names.nextElement();
+                    Header header = (Header)names.nextElement();
                     String value = header.getValue();
                     String name = header.getName();
                     CollectionHelper.appendValue(map, name, value);
                 }
-            }
-            catch (Throwable e) {
+            } catch (Throwable e) {
                 throw new MessageHeaderNamesAccessException(e);
             }
         }

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailProducer.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,20 +16,21 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.impl.DefaultProducer;
+import javax.mail.internet.MimeMessage;
+
 import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultProducer;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.springframework.mail.javamail.JavaMailSender;
 import org.springframework.mail.javamail.MimeMessagePreparator;
 
-import javax.mail.internet.MimeMessage;
-
 /**
  * @version $Revision: 525547 $
  */
 public class MailProducer extends DefaultProducer<MailExchange> {
-    private static final transient Log log = LogFactory.getLog(MailProducer.class);
+    private static final transient Log LOG = LogFactory.getLog(MailProducer.class);
     private final MailEndpoint endpoint;
     private final JavaMailSender sender;
 

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderAccessException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderAccessException.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderAccessException.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderAccessException.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -24,7 +23,7 @@
  */
 public class MessageHeaderAccessException extends RuntimeMailException {
     private static final long serialVersionUID = -3996286386119163309L;
-    private String propertyName;
+    private final String propertyName;
 
     public MessageHeaderAccessException(String propertyName, MessagingException e) {
         super("Error accessing header: " + propertyName, e);

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderNamesAccessException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderNamesAccessException.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderNamesAccessException.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MessageHeaderNamesAccessException.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/RuntimeMailException.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/RuntimeMailException.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/RuntimeMailException.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/RuntimeMailException.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailComponentTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -19,14 +18,6 @@
 
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Endpoint;
-import org.apache.camel.util.ObjectHelper;
-
-import javax.mail.Session;
-import javax.mail.Message;
-import javax.mail.Address;
-import javax.mail.internet.MimeMessage;
-import javax.mail.internet.InternetAddress;
-import java.util.Properties;
 
 /**
  * @version $Revision: 1.1 $

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailMessageTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,16 +16,16 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Endpoint;
-import org.apache.camel.util.ObjectHelper;
+import java.util.Properties;
 
 import javax.mail.Address;
 import javax.mail.Message;
 import javax.mail.Session;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
-import java.util.Properties;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Endpoint;
 
 /**
  * @version $Revision: 1.1 $
@@ -38,29 +37,25 @@
     protected String body = "Hello World!";
 
     public void testMailMessageHandlesMultipleHeaders() throws Exception {
-        mimeMessage.setRecipients(Message.RecipientType.TO, new Address[]{
-                new InternetAddress("james@localhost"), new InternetAddress("bar@localhost")
-        });
+        mimeMessage.setRecipients(Message.RecipientType.TO, new Address[] {new InternetAddress("james@localhost"), new InternetAddress("bar@localhost")});
 
         MailExchange exchange = endpoint.createExchange(mimeMessage);
         MailMessage in = exchange.getIn();
         String value = in.getHeader("TO", String.class);
         assertEquals("value", "james@localhost, bar@localhost", value);
-/*
-        String[] values = assertIsInstanceOf(String[].class, header);
-        log.debug("Found values: " + ObjectHelper.asString(values));
-        assertEquals("Size", 2, values.length);
-        assertEquals("values[0]", "james@localhost", values[0]);
-        assertEquals("values[1]", "bar@localhost", values[1]);
-*/
+        /*
+         * String[] values = assertIsInstanceOf(String[].class, header);
+         * log.debug("Found values: " + ObjectHelper.asString(values));
+         * assertEquals("Size", 2, values.length); assertEquals("values[0]",
+         * "james@localhost", values[0]); assertEquals("values[1]",
+         * "bar@localhost", values[1]);
+         */
 
         assertEquals("body", body, in.getBody());
     }
 
     public void testMailMessageHandlesSingleHeader() throws Exception {
-        mimeMessage.setRecipients(Message.RecipientType.TO, new Address[]{
-                new InternetAddress("james@localhost")
-        });
+        mimeMessage.setRecipients(Message.RecipientType.TO, new Address[] {new InternetAddress("james@localhost")});
 
         MailExchange exchange = endpoint.createExchange(mimeMessage);
         MailMessage in = exchange.getIn();
@@ -90,4 +85,4 @@
         Endpoint endpoint = super.resolveMandatoryEndpoint(uri);
         return assertIsInstanceOf(MailEndpoint.class, endpoint);
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MailRouteTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,18 +16,21 @@
  */
 package org.apache.camel.component.mail;
 
+import java.io.IOException;
+import java.util.HashMap;
+
+import javax.mail.Message;
+import javax.mail.Message.RecipientType;
+import javax.mail.MessagingException;
+
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.Exchange;
-import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.util.ObjectHelper.asString;
+import org.apache.camel.component.mock.MockEndpoint;
+
 import org.jvnet.mock_javamail.Mailbox;
 
-import static javax.mail.Message.RecipientType;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import java.io.IOException;
-import java.util.HashMap;
+import static org.apache.camel.util.ObjectHelper.asString;
 
 /**
  * @version $Revision: 1.1 $
@@ -37,7 +39,7 @@
     private MockEndpoint resultEndpoint;
 
     public void testSendAndReceiveMails() throws Exception {
-        resultEndpoint = (MockEndpoint) resolveMandatoryEndpoint("mock:result");
+        resultEndpoint = (MockEndpoint)resolveMandatoryEndpoint("mock:result");
         resultEndpoint.expectedBodiesReceived("hello world!");
 
         HashMap<String, Object> headers = new HashMap<String, Object>();
@@ -47,17 +49,18 @@
         // lets test the first sent worked
         assertMailboxReceivedMessages("james@localhost");
 
-        // lets sleep to check that the mail poll does not redeliver duplicate mails
+        // lets sleep to check that the mail poll does not redeliver duplicate
+        // mails
         Thread.sleep(3000);
 
         // lets test the receive worked
         resultEndpoint.assertIsSatisfied();
-        
+
         // Validate that the headers were preserved.
         Exchange exchange = resultEndpoint.getReceivedExchanges().get(0);
-        String replyTo = (String) exchange.getIn().getHeader("reply-to");
-        assertEquals( "reply1@localhost", replyTo);
-        
+        String replyTo = (String)exchange.getIn().getHeader("reply-to");
+        assertEquals("reply1@localhost", replyTo);
+
         assertMailboxReceivedMessages("copy@localhost");
     }
 
@@ -82,8 +85,6 @@
     }
 
     protected void logMessage(Message message) throws IOException, MessagingException {
-        log.info("Received: " + message.getContent()
-                + " from: " + asString(message.getFrom())
-                + " to: " + asString(message.getRecipients(RecipientType.TO)));
+        log.info("Received: " + message.getContent() + " from: " + asString(message.getFrom()) + " to: " + asString(message.getRecipients(RecipientType.TO)));
     }
 }

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MimeMessageConsumeTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,12 +16,7 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.util.ObjectHelper;
-import org.jvnet.mock_javamail.Mailbox;
+import java.util.Properties;
 
 import javax.mail.Message;
 import javax.mail.MessagingException;
@@ -32,8 +26,11 @@
 import javax.mail.internet.MimeBodyPart;
 import javax.mail.internet.MimeMessage;
 import javax.mail.internet.MimeMultipart;
-import java.io.IOException;
-import java.util.Properties;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * @version $Revision: 1.1 $

Modified: activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MultipleDestinationConsumeTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MultipleDestinationConsumeTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MultipleDestinationConsumeTest.java (original)
+++ activemq/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/MultipleDestinationConsumeTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,24 +16,22 @@
  */
 package org.apache.camel.component.mail;
 
-import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.mock.MockEndpoint;
+import java.util.Enumeration;
+import java.util.Properties;
 
 import javax.mail.Address;
+import javax.mail.Header;
 import javax.mail.Message;
 import javax.mail.Session;
 import javax.mail.Transport;
-import javax.mail.Header;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
-import java.util.Properties;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Enumeration;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.util.ObjectHelper;
 
 /**
  * @version $Revision: 1.1 $
@@ -51,9 +48,10 @@
         MimeMessage message = new MimeMessage(mailSession);
         message.setText(body);
 
-        message.setRecipients(Message.RecipientType.TO, new Address[]{
-                new InternetAddress("james@localhost"), new InternetAddress("bar@localhost")
-        });
+        message.setRecipients(Message.RecipientType.TO, new Address[] {
+               new InternetAddress("james@localhost"), 
+               new InternetAddress("bar@localhost")
+            });
 
         Transport.send(message);
 

Modified: activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaComponent.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaComponent.java (original)
+++ activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaComponent.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,6 +16,12 @@
  */
 package org.apache.camel.component.mina;
 
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.net.URI;
+import java.util.Map;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.impl.DefaultComponent;
@@ -34,13 +39,6 @@
 import org.apache.mina.transport.vmpipe.VmPipeAddress;
 import org.apache.mina.transport.vmpipe.VmPipeConnector;
 
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Map;
-
 /**
  * @version $Revision$
  */
@@ -59,14 +57,11 @@
         String protocol = u.getScheme();
         if (protocol.equals("tcp")) {
             return createSocketEndpoint(uri, u);
-        }
-        else if (protocol.equals("udp") || protocol.equals("mcast") || protocol.equals("multicast")) {
+        } else if (protocol.equals("udp") || protocol.equals("mcast") || protocol.equals("multicast")) {
             return createDatagramEndpoint(uri, u);
-        }
-        else if (protocol.equals("vm")) {
+        } else if (protocol.equals("vm")) {
             return createVmEndpoint(uri, u);
-        }
-        else {
+        } else {
             throw new IOException("Unrecognised MINA protocol: " + protocol + " for uri: " + uri);
         }
     }

Modified: activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java (original)
+++ activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,6 +16,8 @@
  */
 package org.apache.camel.component.mina;
 
+import java.net.SocketAddress;
+
 import org.apache.camel.Processor;
 import org.apache.camel.impl.DefaultConsumer;
 import org.apache.commons.logging.Log;
@@ -26,15 +27,14 @@
 import org.apache.mina.common.IoHandlerAdapter;
 import org.apache.mina.common.IoSession;
 
-import java.net.SocketAddress;
-
 /**
- * A @{link Consumer} for MINA
- *
+ * A
+ * 
+ * @{link Consumer} for MINA
  * @version $Revision$
  */
 public class MinaConsumer extends DefaultConsumer<MinaExchange> {
-    private static final transient Log log = LogFactory.getLog(MinaConsumer.class);
+    private static final transient Log LOG = LogFactory.getLog(MinaConsumer.class);
 
     private final MinaEndpoint endpoint;
     private final SocketAddress address;
@@ -43,15 +43,15 @@
     public MinaConsumer(final MinaEndpoint endpoint, Processor processor) {
         super(endpoint, processor);
         this.endpoint = endpoint;
-         address = endpoint.getAddress();
-         acceptor = endpoint.getAcceptor();
+        address = endpoint.getAddress();
+        acceptor = endpoint.getAcceptor();
     }
 
     @Override
     protected void doStart() throws Exception {
 
-        if (log.isDebugEnabled()) {
-            log.debug("Binding to server address: " + address + " using acceptor: " + acceptor);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Binding to server address: " + address + " using acceptor: " + acceptor);
         }
 
         IoHandler handler = new IoHandlerAdapter() {

Modified: activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaEndpoint.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,20 +16,16 @@
  */
 package org.apache.camel.component.mina;
 
-import org.apache.camel.CamelContext;
-import org.apache.camel.Producer;
+import java.net.SocketAddress;
+
 import org.apache.camel.Consumer;
 import org.apache.camel.Processor;
-import org.apache.camel.Service;
+import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.mina.common.IoAcceptor;
-import org.apache.mina.common.IoSession;
 import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoServiceConfig;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.net.SocketAddress;
+import org.apache.mina.common.IoSession;
 
 /**
  * @version $Revision$
@@ -69,7 +64,7 @@
     }
 
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     public IoAcceptor getAcceptor() {
         return acceptor;
     }
@@ -86,8 +81,8 @@
         return config;
     }
 
-	public boolean isSingleton() {
-		return true;
-	}
+    public boolean isSingleton() {
+        return true;
+    }
 
 }

Modified: activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaExchange.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaExchange.java (original)
+++ activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaExchange.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,9 +16,8 @@
  */
 package org.apache.camel.component.mina;
 
-import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.CamelContext;
-import org.apache.camel.Exchange;
+import org.apache.camel.impl.DefaultExchange;
 
 /**
  * A {@link Exchange} for MINA

Modified: activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java (original)
+++ activemq/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,7 +16,8 @@
  */
 package org.apache.camel.component.mina;
 
-import org.apache.camel.Producer;
+import java.net.SocketAddress;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultProducer;
 import org.apache.commons.logging.Log;
@@ -28,15 +28,13 @@
 import org.apache.mina.common.IoHandlerAdapter;
 import org.apache.mina.common.IoSession;
 
-import java.net.SocketAddress;
-
 /**
  * A {@link Producer} implementation for MINA
- *
+ * 
  * @version $Revision$
  */
 public class MinaProducer extends DefaultProducer {
-    private static final transient Log log = LogFactory.getLog(MinaProducer.class);
+    private static final transient Log LOG = LogFactory.getLog(MinaProducer.class);
     private IoSession session;
     private MinaEndpoint endpoint;
 
@@ -51,9 +49,8 @@
         }
         Object body = exchange.getIn().getBody();
         if (body == null) {
-            log.warn("No payload for exchange: " + exchange);
-        }
-        else {
+            LOG.warn("No payload for exchange: " + exchange);
+        } else {
             session.write(body);
         }
     }
@@ -62,13 +59,14 @@
     protected void doStart() throws Exception {
         SocketAddress address = endpoint.getAddress();
         IoConnector connector = endpoint.getConnector();
-        if (log.isDebugEnabled()) {
-            log.debug("Creating connector to address: " + address + " using connector: " + connector);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Creating connector to address: " + address + " using connector: " + connector);
         }
         IoHandler ioHandler = new IoHandlerAdapter() {
             @Override
             public void messageReceived(IoSession ioSession, Object object) throws Exception {
-                super.messageReceived(ioSession, object);    /** TODO */
+                super.messageReceived(ioSession, object);
+                /** TODO */
             }
         };
         ConnectFuture future = connector.connect(address, ioHandler, endpoint.getConfig());

Modified: activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaMulticastTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaMulticastTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaMulticastTest.java (original)
+++ activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaMulticastTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -25,4 +24,5 @@
     protected void setUp() throws Exception {
         uri = "mina:multicast://224.1.2.3:6255";
         super.setUp();
-    }}
+    }
+}

Modified: activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpTest.java (original)
+++ activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaTcpTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java (original)
+++ activemq/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaVmTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,18 +16,19 @@
  */
 package org.apache.camel.component.mina;
 
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
 import junit.framework.TestCase;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/MsvComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/MsvComponent.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/MsvComponent.java (original)
+++ activemq/camel/trunk/components/camel-msv/src/main/java/org/apache/camel/component/validator/msv/MsvComponent.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,13 +16,15 @@
  */
 package org.apache.camel.component.validator.msv;
 
-import org.apache.camel.component.validator.ValidatorComponent;
-import org.apache.camel.component.validator.SpringValidator;
-import org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl;
-import org.iso_relax.verifier.VerifierConfigurationException;
+import java.util.Map;
 
 import javax.xml.XMLConstants;
-import java.util.Map;
+
+import org.apache.camel.component.validator.SpringValidator;
+import org.apache.camel.component.validator.ValidatorComponent;
+
+import org.iso_relax.verifier.VerifierConfigurationException;
+import org.iso_relax.verifier.jaxp.validation.RELAXNGSchemaFactoryImpl;
 
 /**
  * The <a href="http://activemq.apache.org/camel/msv.html">MSV Component</a> uses the

Modified: activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/msv/RelaxNGRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/msv/RelaxNGRouteTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/msv/RelaxNGRouteTest.java (original)
+++ activemq/camel/trunk/components/camel-msv/src/test/java/org/apache/camel/component/validator/msv/RelaxNGRouteTest.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/OgnlExpression.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/OgnlExpression.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/OgnlExpression.java (original)
+++ activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/OgnlExpression.java Tue Aug  7 14:33:00 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.
@@ -16,16 +16,17 @@
  */
 package org.apache.camel.language.ognl;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import ognl.Ognl;
 import ognl.OgnlContext;
 import ognl.OgnlException;
+
 import org.apache.camel.Exchange;
-import org.apache.camel.language.IllegalSyntaxException;
-import org.apache.camel.language.ExpressionEvaluationException;
 import org.apache.camel.impl.ExpressionSupport;
-
-import java.util.Map;
-import java.util.HashMap;
+import org.apache.camel.language.ExpressionEvaluationException;
+import org.apache.camel.language.IllegalSyntaxException;
 
 /**
  * @version $Revision: $
@@ -36,35 +37,33 @@
     private final Class<?> type;
     private Object expression;
 
-    public static OgnlExpression ognl(String expression) {
-        return new OgnlExpression(new OgnlLanguage(), expression, Object.class);
-    }
-
     public OgnlExpression(OgnlLanguage language, String expressionString, Class<?> type) {
         this.expressionString = expressionString;
         this.type = type;
         try {
             this.expression = Ognl.parseExpression(expressionString);
-        }
-        catch (OgnlException e) {
+        } catch (OgnlException e) {
             throw new IllegalSyntaxException(language, expressionString);
         }
     }
 
+    public static OgnlExpression ognl(String expression) {
+        return new OgnlExpression(new OgnlLanguage(), expression, Object.class);
+    }
+
     public Object evaluate(Exchange exchange) {
-        // TODO we could use caching here but then we'd have possible concurrency issues
+        // TODO we could use caching here but then we'd have possible
+        // concurrency issues
         // so lets assume that the provider caches
         Map values = new HashMap();
         populateContext(values, exchange);
         OgnlContext oglContext = new OgnlContext();
         try {
             return Ognl.getValue(expression, oglContext, new RootObject(exchange));
-        }
-        catch (OgnlException e) {
+        } catch (OgnlException e) {
             throw new ExpressionEvaluationException(this, exchange, e);
         }
     }
-
 
     protected void populateContext(Map map, Exchange exchange) {
         map.put("exchange", exchange);

Modified: activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/OgnlLanguage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/OgnlLanguage.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/OgnlLanguage.java (original)
+++ activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/OgnlLanguage.java Tue Aug  7 14:33:00 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.

Modified: activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/RootObject.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/RootObject.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/RootObject.java (original)
+++ activemq/camel/trunk/components/camel-ognl/src/main/java/org/apache/camel/language/ognl/RootObject.java Tue Aug  7 14:33:00 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.language.ognl;
 
+import java.util.Map;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
-
-import java.util.Map;
 
 /**
  * @version $Revision: $

Modified: activemq/camel/trunk/components/camel-ognl/src/test/java/org/apache/camel/language/ognl/OgnlTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ognl/src/test/java/org/apache/camel/language/ognl/OgnlTest.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-ognl/src/test/java/org/apache/camel/language/ognl/OgnlTest.java (original)
+++ activemq/camel/trunk/components/camel-ognl/src/test/java/org/apache/camel/language/ognl/OgnlTest.java Tue Aug  7 14:33:00 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.

Modified: activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/CamelJob.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/CamelJob.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/CamelJob.java (original)
+++ activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/CamelJob.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java (original)
+++ activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,32 +16,30 @@
  */
 package org.apache.camel.component.quartz;
 
+import java.net.URI;
+import java.util.Map;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.util.IntrospectionSupport;
-import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
+import org.quartz.CronTrigger;
 import org.quartz.JobDetail;
 import org.quartz.Scheduler;
 import org.quartz.SchedulerException;
 import org.quartz.SchedulerFactory;
 import org.quartz.Trigger;
-import org.quartz.CronTrigger;
 import org.quartz.impl.StdSchedulerFactory;
 
-import java.util.Map;
-import java.net.URI;
-
-import com.sun.jndi.toolkit.url.Uri;
-
 /**
  * A <a href="http://activemq.apache.org/camel/quartz.html">Quartz Component</a>
- *
+ * 
  * @version $Revision:520964 $
  */
 public class QuartzComponent extends DefaultComponent<QuartzExchange> {
-    private static final transient Log log = LogFactory.getLog(QuartzComponent.class);
+    private static final transient Log LOG = LogFactory.getLog(QuartzComponent.class);
     private SchedulerFactory factory;
     private Scheduler scheduler;
     private Map<Trigger, JobDetail> triggers;
@@ -76,28 +73,21 @@
                 // lets allow / instead of spaces and allow $ instead of ?
                 cronExpression = cronExpression.replace('/', ' ');
                 cronExpression = cronExpression.replace('$', '?');
-                log.debug("Creating cron trigger: " + cronExpression);
+                LOG.debug("Creating cron trigger: " + cronExpression);
                 cronTrigger.setCronExpression(cronExpression);
                 answer.setTrigger(cronTrigger);
-            }
-            else {
+            } else {
                 name = path;
             }
             group = u.getHost();
-        }
-        else {
+        } else {
             name = u.getHost();
         }
-/*
-        String[] names = ObjectHelper.splitOnCharacter(remaining, "/", 2);
-        if (names[1] != null) {
-            group = names[0];
-            name = names[1];
-        }
-        else {
-            name = names[0];
-        }
-*/
+        /*
+         * String[] names = ObjectHelper.splitOnCharacter(remaining, "/", 2); if
+         * (names[1] != null) { group = names[0]; name = names[1]; } else { name =
+         * names[0]; }
+         */
         Trigger trigger = cronTrigger;
         if (trigger == null) {
             trigger = answer.getTrigger();
@@ -129,7 +119,7 @@
     }
 
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     public SchedulerFactory getFactory() {
         if (factory == null) {
             factory = createSchedulerFactory();
@@ -161,7 +151,7 @@
     }
 
     // Implementation methods
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     protected SchedulerFactory createSchedulerFactory() {
         return new StdSchedulerFactory();
     }
@@ -169,4 +159,4 @@
     protected Scheduler createScheduler() throws SchedulerException {
         return getFactory().getScheduler();
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzConsumer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzConsumer.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzConsumer.java (original)
+++ activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzConsumer.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java Tue Aug  7 14:33:00 2007
@@ -1,4 +1,4 @@
-/*
+/**
  * 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.
@@ -16,6 +16,10 @@
  */
 package org.apache.camel.component.quartz;
 
+import java.util.Date;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.impl.DefaultEndpoint;
@@ -24,26 +28,23 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.quartz.JobDetail;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 import org.quartz.Scheduler;
 import org.quartz.SchedulerException;
-import org.quartz.Trigger;
 import org.quartz.SimpleTrigger;
-
-import java.util.Date;
-import java.util.Map;
-import java.util.Set;
+import org.quartz.Trigger;
 
 /**
  * A <a href="http://activemq.apache.org/quartz.html">Quartz Endpoint</a>
- *
+ * 
  * @version $Revision:520964 $
  */
 public class QuartzEndpoint extends DefaultEndpoint<QuartzExchange> {
     public static final String ENDPOINT_KEY = "org.apache.camel.quartz";
-    private static final transient Log log = LogFactory.getLog(QuartzEndpoint.class);
+    private static final transient Log LOG = LogFactory.getLog(QuartzEndpoint.class);
     private Scheduler scheduler;
     private LoadBalancer loadBalancer;
     private Trigger trigger;
@@ -99,21 +100,19 @@
 
     /**
      * This method is invoked when a Quartz job is fired.
-     *
+     * 
      * @param jobExecutionContext the Quartz Job context
      */
     public void onJobExecute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        if (log.isDebugEnabled()) {
-            log.debug("Firing Quartz Job with context: " + jobExecutionContext);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Firing Quartz Job with context: " + jobExecutionContext);
         }
         QuartzExchange exchange = createExchange(jobExecutionContext);
         try {
             getLoadBalancer().process(exchange);
-        }
-        catch (JobExecutionException e) {
+        } catch (JobExecutionException e) {
             throw e;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw new JobExecutionException(e);
         }
     }
@@ -135,11 +134,11 @@
     }
 
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
 
     @Override
     public QuartzComponent getComponent() {
-        return (QuartzComponent) super.getComponent();
+        return (QuartzComponent)super.getComponent();
     }
 
     public boolean isSingleton() {
@@ -184,7 +183,7 @@
     }
 
     // Implementation methods
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     public synchronized void consumerStarted(QuartzConsumer consumer) throws SchedulerException {
         getLoadBalancer().addProcessor(consumer.getProcessor());
 
@@ -214,4 +213,4 @@
     protected Trigger createTrigger() {
         return new SimpleTrigger();
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzExchange.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzExchange.java (original)
+++ activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzExchange.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,

Modified: activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java?view=diff&rev=563665&r1=563664&r2=563665
==============================================================================
--- activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java (original)
+++ activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzMessage.java Tue Aug  7 14:33:00 2007
@@ -1,5 +1,4 @@
 /**
- *
  * 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.
@@ -7,7 +6,7 @@
  * (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
+ *      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,
@@ -17,11 +16,12 @@
  */
 package org.apache.camel.component.quartz;
 
+import java.util.Map;
+
 import org.apache.camel.impl.DefaultMessage;
+
 import org.quartz.JobExecutionContext;
 import org.quartz.Trigger;
-
-import java.util.Map;
 
 /**
  * @version $Revision: 1.1 $



Mime
View raw message