You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2008/03/27 02:21:43 UTC

svn commit: r641680 - in /activemq/camel/trunk/components: camel-osgi/src/main/java/org/apache/camel/osgi/ camel-quartz/src/main/java/org/apache/camel/component/quartz/ camel-rmi/src/main/java/org/apache/camel/component/rmi/ camel-saxon/src/main/java/o...

Author: ningjiang
Date: Wed Mar 26 18:21:31 2008
New Revision: 641680

URL: http://svn.apache.org/viewvc?rev=641680&view=rev
Log:
Fixed some other components CS errors

Modified:
    activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java
    activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java
    activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
    activemq/camel/trunk/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzEndpoint.java
    activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiEndpoint.java
    activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiRegistryBean.java
    activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQuery.java
    activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryAnnotationExpressionFactory.java
    activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
    activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java
    activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryLanguage.java
    activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/BeanWithXQueryInjectionTest.java
    activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryFilterTest.java
    activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java
    activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java
    activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryWithExplicitTypeTest.java
    activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/BeanShell.java
    activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Groovy.java
    activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScript.java
    activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/PHP.java
    activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Python.java
    activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Ruby.java
    activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateComponent.java
    activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateEndpoint.java
    activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java
    activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
    activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
    activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
    activemq/camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConverterTest.java
    activemq/camel/trunk/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
    activemq/camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java
    activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/PurchaseOrder.java
    activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/UnmarshalThenMarshalTest.java

Modified: activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java (original)
+++ activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/CamelContextFactoryBean.java Wed Mar 26 18:21:31 2008
@@ -16,14 +16,14 @@
  */
 package org.apache.camel.osgi;
 
-import org.apache.camel.spring.SpringCamelContext;
-import org.osgi.framework.BundleContext;
-import org.springframework.osgi.context.BundleContextAware;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
+
+import org.apache.camel.spring.SpringCamelContext;
+import org.osgi.framework.BundleContext;
+import org.springframework.osgi.context.BundleContextAware;
 
 /**
  * Created by IntelliJ IDEA.

Modified: activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java (original)
+++ activemq/camel/trunk/components/camel-osgi/src/main/java/org/apache/camel/osgi/OsgiComponentResolver.java Wed Mar 26 18:21:31 2008
@@ -35,10 +35,7 @@
 import org.springframework.osgi.util.BundleDelegatingClassLoader;
 
 /**
- * Created by IntelliJ IDEA.
- * User: gnodet
- * Date: Sep 20, 2007
- * Time: 10:37:31 AM
+ * Created by IntelliJ IDEA. User: gnodet Date: Sep 20, 2007 Time: 10:37:31 AM
  * To change this template use File | Settings | File Templates.
  */
 public class OsgiComponentResolver implements ComponentResolver {
@@ -73,7 +70,7 @@
         Bundle bundle;
         String path;
         String name;
-        Class  type;
+        Class type;
     }
 
     public OsgiComponentResolver(BundleContext bundleContext) {
@@ -91,11 +88,11 @@
         for (int i = 0; i < previousBundles.length; i++) {
             int state = previousBundles[i].getState();
             if (state == Bundle.RESOLVED || state == Bundle.ACTIVE) {
-            	try {
-            		mayBeAddComponentFor(previousBundles[i]);
-            	} catch (Exception e) {
-            		LOG.error("Component " + previousBundles[i] + " not added due to " + e.toString(), e);
-            	}
+                try {
+                    mayBeAddComponentFor(previousBundles[i]);
+                } catch (Exception e) {
+                    LOG.error("Component " + previousBundles[i] + " not added due to " + e.toString(), e);
+                }
             }
         }
     }
@@ -104,7 +101,7 @@
         Enumeration e = bundle.getEntryPaths("/META-INF/services/org/apache/camel/component/");
         if (e != null) {
             while (e.hasMoreElements()) {
-                String path = (String) e.nextElement();
+                String path = (String)e.nextElement();
                 if (LOG.isDebugEnabled()) {
                     LOG.debug("Found entry: " + path + " in bundle " + bundle.getSymbolicName());
                 }
@@ -147,7 +144,7 @@
                 } catch (Exception ignore) {
                 }
             }
-            String classname = (String) properties.get("class");
+            String classname = (String)properties.get("class");
             ClassLoader loader = BundleDelegatingClassLoader.createBundleClassLoaderFor(entry.bundle);
             entry.type = loader.loadClass(classname);
         }
@@ -164,16 +161,15 @@
             if (bean != null && LOG.isDebugEnabled()) {
                 LOG.debug("Found component: " + name + " in registry: " + bean);
             }
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             LOG.debug("Ignored error looking up bean: " + name + ". Error: " + e);
         }
         if (bean != null) {
             if (bean instanceof Component) {
-                return (Component) bean;
-            }
-            else {
-                throw new IllegalArgumentException("Bean with name: " + name + " in registry is not a Component: " + bean);
+                return (Component)bean;
+            } else {
+                throw new IllegalArgumentException("Bean with name: " + name
+                                                   + " in registry is not a Component: " + bean);
             }
         }
         // Check in OSGi bundles
@@ -181,17 +177,17 @@
         Class type = null;
         try {
             type = getComponent(name);
-        }
-        catch (Throwable e) {
+        } catch (Throwable e) {
             throw new IllegalArgumentException("Invalid URI, no Component registered for scheme : " + name, e);
         }
         if (type == null) {
             return null;
         }
         if (Component.class.isAssignableFrom(type)) {
-            return (Component) context.getInjector().newInstance(type);
+            return (Component)context.getInjector().newInstance(type);
         } else {
-            throw new IllegalArgumentException("Type is not a Component implementation. Found: " + type.getName());
+            throw new IllegalArgumentException("Type is not a Component implementation. Found: "
+                                               + type.getName());
         }
     }
 

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?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- 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 Wed Mar 26 18:21:31 2008
@@ -16,6 +16,9 @@
  */
 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;
@@ -29,12 +32,9 @@
 import org.quartz.Trigger;
 import org.quartz.impl.StdSchedulerFactory;
 
-import java.net.URI;
-import java.util.Map;
-
 /**
  * A <a href="http://activemq.apache.org/camel/quartz.html">Quartz Component</a>
- * 
+ *
  * @version $Revision:520964 $
  */
 public class QuartzComponent extends DefaultComponent<QuartzExchange> {

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?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- 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 Wed Mar 26 18:21:31 2008
@@ -20,16 +20,15 @@
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.camel.ExchangePattern;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.ExchangePattern;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.camel.processor.loadbalancer.LoadBalancer;
 import org.apache.camel.processor.loadbalancer.RoundRobinLoadBalancer;
 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;
@@ -40,7 +39,7 @@
 
 /**
  * A <a href="http://activemq.apache.org/quartz.html">Quartz Endpoint</a>
- * 
+ *
  * @version $Revision:520964 $
  */
 public class QuartzEndpoint extends DefaultEndpoint<QuartzExchange> {
@@ -101,7 +100,7 @@
 
     /**
      * This method is invoked when a Quartz job is fired.
-     * 
+     *
      * @param jobExecutionContext the Quartz Job context
      */
     public void onJobExecute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

Modified: activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiEndpoint.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiEndpoint.java Wed Mar 26 18:21:31 2008
@@ -25,10 +25,10 @@
 import java.util.List;
 
 import org.apache.camel.Consumer;
+import org.apache.camel.ExchangePattern;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
 import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.ExchangePattern;
 import org.apache.camel.component.bean.BeanExchange;
 import org.apache.camel.impl.DefaultEndpoint;
 

Modified: activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiRegistryBean.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiRegistryBean.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiRegistryBean.java (original)
+++ activemq/camel/trunk/components/camel-rmi/src/main/java/org/apache/camel/component/rmi/RmiRegistryBean.java Wed Mar 26 18:21:31 2008
@@ -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,9 +18,9 @@
 
 import java.rmi.registry.Registry;
 
-import org.apache.camel.component.bean.RegistryBean;
-import org.apache.camel.component.bean.ParameterMappingStrategy;
 import org.apache.camel.CamelContext;
+import org.apache.camel.component.bean.ParameterMappingStrategy;
+import org.apache.camel.component.bean.RegistryBean;
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQuery.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQuery.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQuery.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQuery.java Wed Mar 26 18:21:31 2008
@@ -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,14 @@
  */
 package org.apache.camel.component.xquery;
 
-import org.apache.camel.language.LanguageAnnotation;
-import org.apache.camel.language.NamespacePrefix;
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.camel.language.LanguageAnnotation;
+import org.apache.camel.language.NamespacePrefix;
+
 /**
  * An annotation for injection of an XQuery expressions into a field, property, method or parameter when using
  * <a href="http://activemq.apache.org/camel/bean-integration.html">Bean Integration</a>.
@@ -35,9 +34,9 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
 @LanguageAnnotation(language = "xquery", factory = XQueryAnnotationExpressionFactory.class)
 public @interface XQuery {
-    public String value();
+    String value();
 
-    public NamespacePrefix[] namespaces() default {
+    NamespacePrefix[] namespaces() default {
     @NamespacePrefix(prefix = "soap", uri = "http://www.w3.org/2003/05/soap-envelope"),
     @NamespacePrefix(prefix = "xsd", uri = "http://www.w3.org/2001/XMLSchema")};
 }

Modified: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryAnnotationExpressionFactory.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryAnnotationExpressionFactory.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryAnnotationExpressionFactory.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryAnnotationExpressionFactory.java Wed Mar 26 18:21:31 2008
@@ -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.xquery;
 
+import java.lang.annotation.Annotation;
+
 import net.sf.saxon.functions.Collection;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Expression;
@@ -24,30 +25,29 @@
 import org.apache.camel.language.LanguageAnnotation;
 import org.apache.camel.language.NamespacePrefix;
 
-import java.lang.annotation.Annotation;
-
 /**
  * @version $Revision$
  */
 public class XQueryAnnotationExpressionFactory extends DefaultAnnotationExpressionFactory {
     @Override
-    public Expression createExpression(CamelContext camelContext, Annotation annotation, LanguageAnnotation languageAnnotation, Class expressionReturnType) {
-        String XQuery = getExpressionFromAnnotation(annotation);
-        XQueryBuilder builder = XQueryBuilder.xquery(XQuery);
+    public Expression createExpression(CamelContext camelContext, Annotation annotation,
+                                       LanguageAnnotation languageAnnotation, Class expressionReturnType) {
+        String xQuery = getExpressionFromAnnotation(annotation);
+        XQueryBuilder builder = XQueryBuilder.xquery(xQuery);
         if (annotation instanceof XQuery) {
-            XQuery XQueryAnnotation = (XQuery) annotation;
-            NamespacePrefix[] namespaces = XQueryAnnotation.namespaces();
+            XQuery xQueryAnnotation = (XQuery)annotation;
+            NamespacePrefix[] namespaces = xQueryAnnotation.namespaces();
             if (namespaces != null) {
                 for (NamespacePrefix namespacePrefix : namespaces) {
                     // TODO
-                    //builder = builder.namespace(namespacePrefix.prefix(), namespacePrefix.uri());
+                    // builder = builder.namespace(namespacePrefix.prefix(),
+                    // namespacePrefix.uri());
                 }
             }
         }
         if (expressionReturnType.isAssignableFrom(String.class)) {
             builder.setResultsFormat(ResultFormat.String);
-        }
-        else if (expressionReturnType.isAssignableFrom(Collection.class)) {
+        } else if (expressionReturnType.isAssignableFrom(Collection.class)) {
             builder.setResultsFormat(ResultFormat.List);
         }
         return builder;

Modified: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java Wed Mar 26 18:21:31 2008
@@ -36,6 +36,8 @@
 import javax.xml.transform.dom.DOMResult;
 import javax.xml.transform.stream.StreamResult;
 
+import org.w3c.dom.Node;
+
 import net.sf.saxon.Configuration;
 import net.sf.saxon.om.DocumentInfo;
 import net.sf.saxon.om.Item;
@@ -59,7 +61,7 @@
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.w3c.dom.Node;
+
 
 /**
  * Creates an XQuery builder
@@ -93,34 +95,30 @@
             if (resultType != null) {
                 if (resultType.equals(String.class)) {
                     return evaluateAsString(exchange);
-                }
-                else if (resultType.isAssignableFrom(Collection.class)) {
+                } else if (resultType.isAssignableFrom(Collection.class)) {
                     return evaluateAsList(exchange);
-                }
-                else if (resultType.isAssignableFrom(Node.class)) {
+                } else if (resultType.isAssignableFrom(Node.class)) {
                     return evaluateAsDOM(exchange);
-                }
-                else {
+                } else {
                     // TODO figure out how to convert to the given type
                 }
             }
             switch (resultsFormat) {
-                case Bytes:
-                    return evaluateAsBytes(exchange);
-                case BytesSource:
-                    return evaluateAsBytesSource(exchange);
-                case DOM:
-                    return evaluateAsDOM(exchange);
-                case List:
-                    return evaluateAsList(exchange);
-                case StringSource:
-                    return evaluateAsStringSource(exchange);
-                case String:
-                default:
-                    return evaluateAsString(exchange);
+            case Bytes:
+                return evaluateAsBytes(exchange);
+            case BytesSource:
+                return evaluateAsBytesSource(exchange);
+            case DOM:
+                return evaluateAsDOM(exchange);
+            case List:
+                return evaluateAsList(exchange);
+            case StringSource:
+                return evaluateAsStringSource(exchange);
+            case String:
+            default:
+                return evaluateAsString(exchange);
             }
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw new RuntimeExpressionException(e);
         }
     }
@@ -175,8 +173,7 @@
         try {
             List list = evaluateAsList(exchange);
             return matches(exchange, list);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw new RuntimeExpressionException(e);
         }
     }
@@ -187,8 +184,7 @@
             if (!matches(exchange, list)) {
                 throw new AssertionError(this + " failed on " + exchange + " as evaluated: " + list);
             }
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw new AssertionError(e);
         }
     }
@@ -380,8 +376,7 @@
         Source source = null;
         if (item != null) {
             dynamicQueryContext.setContextItem(item);
-        }
-        else {
+        } else {
             source = in.getBody(Source.class);
             if (source == null) {
                 if (LOG.isDebugEnabled()) {

Modified: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryComponent.java Wed Mar 26 18:21:31 2008
@@ -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,
@@ -21,7 +20,6 @@
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
-import org.apache.camel.component.xquery.XQueryBuilder;
 import org.apache.camel.component.ResourceBasedComponent;
 import org.apache.camel.impl.ProcessorEndpoint;
 import org.springframework.core.io.Resource;

Modified: activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryLanguage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryLanguage.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryLanguage.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryLanguage.java Wed Mar 26 18:21:31 2008
@@ -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,10 +16,10 @@
  */
 package org.apache.camel.component.xquery;
 
-import org.apache.camel.spi.Language;
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.Predicate;
+import org.apache.camel.spi.Language;
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/BeanWithXQueryInjectionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/BeanWithXQueryInjectionTest.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/BeanWithXQueryInjectionTest.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/BeanWithXQueryInjectionTest.java Wed Mar 26 18:21:31 2008
@@ -16,15 +16,15 @@
  */
 package org.apache.camel.builder.saxon;
 
+import javax.naming.Context;
+
 import org.apache.camel.ContextTestSupport;
-import org.apache.camel.component.xquery.XQuery;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.xquery.XQuery;
 import org.apache.camel.processor.BeanRouteTest;
 import org.apache.camel.util.jndi.JndiContext;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import javax.naming.Context;
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryFilterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryFilterTest.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryFilterTest.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/builder/saxon/XQueryFilterTest.java Wed Mar 26 18:21:31 2008
@@ -60,9 +60,7 @@
         return new RouteBuilder() {
             public void configure() {
                 // START SNIPPET: example
-                from("direct:start").
-                        filter().xquery("/person[@name='James']").
-                to("mock:result");
+                from("direct:start").filter().xquery("/person[@name='James']").to("mock:result");
                 // END SNIPPET: example
             }
         };

Modified: activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/TestBean.java Wed Mar 26 18:21:31 2008
@@ -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,6 @@
  */
 package org.apache.camel.component.xquery;
 
-import org.apache.camel.component.xquery.XQuery;
 
 /**
  * @version $Revision$

Modified: activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryEndpointTest.java Wed Mar 26 18:21:31 2008
@@ -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-saxon/src/test/java/org/apache/camel/component/xquery/XQueryWithExplicitTypeTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryWithExplicitTypeTest.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryWithExplicitTypeTest.java (original)
+++ activemq/camel/trunk/components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryWithExplicitTypeTest.java Wed Mar 26 18:21:31 2008
@@ -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,
@@ -29,7 +28,7 @@
     protected MockEndpoint tampaEndpoint;
 
     public void testFunctions() throws Exception {
-    	raleighEndpoint.expectedMessageCount(1);
+        raleighEndpoint.expectedMessageCount(1);
         tampaEndpoint.expectedMessageCount(0);
 
         template.sendBody("direct:start", "<person name='Hadrian' city='Raleigh'/>");

Modified: activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/BeanShell.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/BeanShell.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/BeanShell.java (original)
+++ activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/BeanShell.java Wed Mar 26 18:21:31 2008
@@ -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,13 @@
  */
 package org.apache.camel.builder.script;
 
-import org.apache.camel.language.LanguageAnnotation;
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.camel.language.LanguageAnnotation;
+
 /**
  * An annotation for injection of BeanShell expressions
  *  into method parameters, fields or properties
@@ -34,5 +33,5 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
 @LanguageAnnotation(language = "beanshell")
 public @interface BeanShell {
-    public abstract String value();
+    String value();
 }

Modified: activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Groovy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Groovy.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Groovy.java (original)
+++ activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Groovy.java Wed Mar 26 18:21:31 2008
@@ -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,13 @@
  */
 package org.apache.camel.builder.script;
 
-import org.apache.camel.language.LanguageAnnotation;
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.camel.language.LanguageAnnotation;
+
 /**
  * An annotation for injection of <a href="http://groovy.codehaus.org/">Groovy</a> expressions
  *  into method parameters, fields or properties
@@ -34,5 +33,5 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
 @LanguageAnnotation(language = "groovy")
 public @interface Groovy {
-    public abstract String value();
+    String value();
 }

Modified: activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScript.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScript.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScript.java (original)
+++ activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScript.java Wed Mar 26 18:21:31 2008
@@ -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,13 @@
  */
 package org.apache.camel.builder.script;
 
-import org.apache.camel.language.LanguageAnnotation;
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.camel.language.LanguageAnnotation;
+
 /**
  * An annotation for injection of JavaScript expressions
  *  into method parameters, fields or properties
@@ -34,5 +33,5 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
 @LanguageAnnotation(language = "js")
 public @interface JavaScript {
-    public abstract String value();
+    String value();
 }

Modified: activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/PHP.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/PHP.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/PHP.java (original)
+++ activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/PHP.java Wed Mar 26 18:21:31 2008
@@ -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,13 @@
  */
 package org.apache.camel.builder.script;
 
-import org.apache.camel.language.LanguageAnnotation;
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.camel.language.LanguageAnnotation;
+
 /**
  * An annotation for injection of PHP expressions
  *  into method parameters, fields or properties
@@ -34,5 +33,5 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
 @LanguageAnnotation(language = "php")
 public @interface PHP {
-    public abstract String value();
+    String value();
 }

Modified: activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Python.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Python.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Python.java (original)
+++ activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Python.java Wed Mar 26 18:21:31 2008
@@ -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,13 @@
  */
 package org.apache.camel.builder.script;
 
-import org.apache.camel.language.LanguageAnnotation;
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.camel.language.LanguageAnnotation;
+
 /**
  * An annotation for injection of Python expressions
  *  into method parameters, fields or properties
@@ -34,5 +33,5 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
 @LanguageAnnotation(language = "python")
 public @interface Python {
-    public abstract String value();
+    String value();
 }

Modified: activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Ruby.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Ruby.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Ruby.java (original)
+++ activemq/camel/trunk/components/camel-script/src/main/java/org/apache/camel/builder/script/Ruby.java Wed Mar 26 18:21:31 2008
@@ -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,13 @@
  */
 package org.apache.camel.builder.script;
 
-import org.apache.camel.language.LanguageAnnotation;
-
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import org.apache.camel.language.LanguageAnnotation;
+
 /**
  * An annotation for injection of <a href="http://ruby-lang.org/">Ruby</a> expressions
  *  into method parameters, fields or properties
@@ -34,5 +33,5 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
 @LanguageAnnotation(language = "jruby")
 public @interface Ruby {
-    public abstract String value();
+    String value();
 }

Modified: activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateComponent.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateComponent.java (original)
+++ activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateComponent.java Wed Mar 26 18:21:31 2008
@@ -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-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateEndpoint.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-stringtemplate/src/main/java/org/apache/camel/component/stringtemplate/StringTemplateEndpoint.java Wed Mar 26 18:21:31 2008
@@ -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-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java (original)
+++ activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityComponent.java Wed Mar 26 18:21:31 2008
@@ -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-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java Wed Mar 26 18:21:31 2008
@@ -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-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java (original)
+++ activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansConverter.java Wed Mar 26 18:21:31 2008
@@ -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,
@@ -27,6 +26,10 @@
 import javax.xml.transform.Source;
 import javax.xml.transform.TransformerException;
 
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.SAXException;
+
 import org.apache.camel.Converter;
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.converter.NIOConverter;
@@ -34,9 +37,6 @@
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.impl.piccolo.xml.XMLStreamReader;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.xml.sax.SAXException;
 
 /**
  * A <a href="http://activemq.apache.org/camel/type-coverter.html">Type Converter</a>

Modified: activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java (original)
+++ activemq/camel/trunk/components/camel-xmlbeans/src/main/java/org/apache/camel/converter/xmlbeans/XmlBeansDataFormat.java Wed Mar 26 18:21:31 2008
@@ -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,
@@ -31,7 +30,7 @@
  *
  * @version $Revision$
  */
-public class XmlBeansDataFormat implements DataFormat{
+public class XmlBeansDataFormat implements DataFormat {
 
     public void marshal(Exchange exchange, Object body, OutputStream stream) throws Exception {
         XmlObject object = ExchangeHelper.convertToMandatoryType(exchange, XmlObject.class, body);

Modified: activemq/camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConverterTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConverterTest.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConverterTest.java (original)
+++ activemq/camel/trunk/components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConverterTest.java Wed Mar 26 18:21:31 2008
@@ -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-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-xmpp/src/main/java/org/apache/camel/component/xmpp/XmppEndpoint.java Wed Mar 26 18:21:31 2008
@@ -17,13 +17,12 @@
 package org.apache.camel.component.xmpp;
 
 import org.apache.camel.Consumer;
+import org.apache.camel.ExchangePattern;
 import org.apache.camel.Processor;
 import org.apache.camel.Producer;
-import org.apache.camel.ExchangePattern;
 import org.apache.camel.impl.DefaultEndpoint;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
 import org.jivesoftware.smack.AccountManager;
 import org.jivesoftware.smack.XMPPConnection;
 import org.jivesoftware.smack.XMPPException;
@@ -33,7 +32,7 @@
 
 /**
  * An XMPP Endpoint
- * 
+ *
  * @version $Revision:520964 $
  */
 public class XmppEndpoint extends DefaultEndpoint<XmppExchange> {
@@ -99,7 +98,7 @@
     /**
      * Sets the binding used to convert from a Camel message to and from an XMPP
      * message
-     * 
+     *
      * @param binding the binding to use
      */
     public void setBinding(XmppBinding binding) {

Modified: activemq/camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java (original)
+++ activemq/camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java Wed Mar 26 18:21:31 2008
@@ -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,19 +16,21 @@
  */
 package org.apache.camel.dataformat.xstream;
 
+
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import javax.xml.stream.XMLStreamWriter;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
 
 import com.thoughtworks.xstream.XStream;
-import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
 import com.thoughtworks.xstream.io.xml.QNameMap;
-import com.thoughtworks.xstream.io.xml.StaxWriter;
 import com.thoughtworks.xstream.io.xml.StaxReader;
+import com.thoughtworks.xstream.io.xml.StaxWriter;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.converter.jaxp.StaxConverter;
 import org.apache.camel.spi.DataFormat;
@@ -40,7 +41,7 @@
  *
  * @version $Revision$
  */
-public class XStreamDataFormat implements DataFormat{
+public class XStreamDataFormat implements DataFormat {
 
     private XStream xstream;
     private StaxConverter staxConverter;

Modified: activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/PurchaseOrder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/PurchaseOrder.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/PurchaseOrder.java (original)
+++ activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/PurchaseOrder.java Wed Mar 26 18:21:31 2008
@@ -34,14 +34,17 @@
     @Override
     public boolean equals(Object o) {
         if (o instanceof PurchaseOrder) {
-            PurchaseOrder that = (PurchaseOrder) o;
-            return ObjectHelper.equal(this.name, that.name) &&
-                    ObjectHelper.equal(this.amount, that.amount) &&
-                    ObjectHelper.equal(this.price, that.price);
+            PurchaseOrder that = (PurchaseOrder)o;
+            return ObjectHelper.equal(this.name, that.name) && ObjectHelper.equal(this.amount, that.amount)
+                   && ObjectHelper.equal(this.price, that.price);
         }
         return false;
     }
 
+    public int hashCode() {
+        return (int)(name.hashCode() + (price * 100) + (amount * 100));
+    }
+
     public double getAmount() {
         return amount;
     }
@@ -65,4 +68,4 @@
     public void setPrice(double price) {
         this.price = price;
     }
-}
\ No newline at end of file
+}

Modified: activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/UnmarshalThenMarshalTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/UnmarshalThenMarshalTest.java?rev=641680&r1=641679&r2=641680&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/UnmarshalThenMarshalTest.java (original)
+++ activemq/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/UnmarshalThenMarshalTest.java Wed Mar 26 18:21:31 2008
@@ -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,