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/04/07 16:40:35 UTC

svn commit: r645543 - in /activemq/camel/trunk: components/ components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/ components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/ components/camel-jms/src/main/java/org/apa...

Author: ningjiang
Date: Mon Apr  7 07:40:32 2008
New Revision: 645543

URL: http://svn.apache.org/viewvc?rev=645543&view=rev
Log:
Fixed the CS errors in the camel-jms and camel-jxpath component

Modified:
    activemq/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConverter.java
    activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToAsciiFileNoBodyConversionTest.java
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultQueueBrowseStrategy.java
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java
    activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java
    activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPath.java
    activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPathLanguage.java
    activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/BeanWithJXPathInjectionTest.java
    activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/JXPathTest.java
    activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/PersonBean.java
    activemq/camel/trunk/components/pom.xml
    activemq/camel/trunk/tests/camel-itest-spring-2.0/src/test/java/org/apache/camel/itest/spring2/JmsRouteTest.java

Modified: activemq/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConverter.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConverter.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConverter.java (original)
+++ activemq/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileConverter.java Mon Apr  7 07:40:32 2008
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.component.file.remote;
 
-import org.apache.camel.Converter;
-
+import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.InputStream;
-import java.io.ByteArrayInputStream;
+
+import org.apache.camel.Converter;
 
 /**
  * A set of converter methods for working with remote file types
@@ -28,7 +28,10 @@
  * @version $Revision$
  */
 @Converter
-public class RemoteFileConverter {
+public final class RemoteFileConverter {
+    private RemoteFileConverter() {
+        // Helper Class
+    }
 
     @Converter
     public static byte[] toByteArray(ByteArrayOutputStream os) {
@@ -44,5 +47,5 @@
     public static InputStream toInputStream(ByteArrayOutputStream os) {
         return new ByteArrayInputStream(os.toByteArray());
     }
-    
+
 }

Modified: activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToAsciiFileNoBodyConversionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToAsciiFileNoBodyConversionTest.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToAsciiFileNoBodyConversionTest.java (original)
+++ activemq/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpToAsciiFileNoBodyConversionTest.java Mon Apr  7 07:40:32 2008
@@ -18,16 +18,16 @@
 
 import java.io.File;
 
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.component.file.FileComponent;
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
 import org.apache.camel.Producer;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.file.FileComponent;
+import org.apache.camel.component.mock.MockEndpoint;
 
 /**
  * Unit testing a FTP ASCII transfer that Camel provides the needed conversion to String from
- * the input stream. 
+ * the input stream.
  */
 public class FromFtpToAsciiFileNoBodyConversionTest extends FtpServerTestSupport {
 

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultQueueBrowseStrategy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultQueueBrowseStrategy.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultQueueBrowseStrategy.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultQueueBrowseStrategy.java Mon Apr  7 07:40:32 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,25 +16,25 @@
  */
 package org.apache.camel.component.jms;
 
-import java.util.List;
 import java.util.ArrayList;
 import java.util.Enumeration;
+import java.util.List;
 
-import javax.jms.Session;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.QueueBrowser;
+import javax.jms.Session;
 
-import org.springframework.jms.core.JmsOperations;
-import org.springframework.jms.core.BrowserCallback;
 import org.apache.camel.Exchange;
+import org.springframework.jms.core.BrowserCallback;
+import org.springframework.jms.core.JmsOperations;
 
 /**
  * A default implementation of queue browsing using the Spring 2.5.x {@link BrowserCallback}
  * @version $Revision: 1.1 $
  */
 public class DefaultQueueBrowseStrategy implements QueueBrowseStrategy {
-    
+
     public List<Exchange> browse(JmsOperations template, String queue, final JmsQueueEndpoint endpoint) {
         return  (List<Exchange>) template.browse(queue, new BrowserCallback() {
 

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java Mon Apr  7 07:40:32 2008
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.jms;
 
-
 import java.util.Map;
 
 import javax.jms.ConnectionFactory;
@@ -27,7 +26,9 @@
 import org.apache.camel.Endpoint;
 import org.apache.camel.component.jms.requestor.Requestor;
 import org.apache.camel.impl.DefaultComponent;
-
+import org.apache.camel.util.ObjectHelper;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
@@ -38,10 +39,8 @@
 import org.springframework.jms.support.converter.MessageConverter;
 import org.springframework.jms.support.destination.DestinationResolver;
 import org.springframework.transaction.PlatformTransactionManager;
+
 import static org.apache.camel.util.ObjectHelper.removeStartingCharacters;
-import org.apache.camel.util.ObjectHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 /**
  * A <a href="http://activemq.apache.org/jms.html">JMS Component</a>
@@ -49,16 +48,16 @@
  * @version $Revision:520964 $
  */
 public class JmsComponent extends DefaultComponent<JmsExchange> implements ApplicationContextAware {
-    private static final transient Log LOG = LogFactory.getLog(JmsComponent.class);
-    
+
     public static final String QUEUE_PREFIX = "queue:";
     public static final String TOPIC_PREFIX = "topic:";
+    private static final transient Log LOG = LogFactory.getLog(JmsComponent.class);
+    private static final String DEFAULT_QUEUE_BROWSE_STRATEGY = "org.apache.camel.component.jms.DefaultQueueBrowseStrategy";
     private JmsConfiguration configuration;
     private ApplicationContext applicationContext;
     private Requestor requestor;
     private QueueBrowseStrategy queueBrowseStrategy;
     private boolean attemptedToCreateQueueBrowserStrategy;
-    private static final String DEFAULT_QUEUE_BROWSE_STRATEGY = "org.apache.camel.component.jms.DefaultQueueBrowseStrategy";
 
     public JmsComponent() {
     }
@@ -116,16 +115,16 @@
         return jmsComponentTransacted(connectionFactory, transactionManager);
     }
 
-    public static JmsComponent jmsComponentTransacted(ConnectionFactory connectionFactory, PlatformTransactionManager transactionManager) {
+    public static JmsComponent jmsComponentTransacted(ConnectionFactory connectionFactory,
+                                                      PlatformTransactionManager transactionManager) {
         JmsConfiguration template = new JmsConfiguration(connectionFactory);
         template.setTransactionManager(transactionManager);
         template.setTransacted(true);
         return jmsComponent(template);
     }
 
-
     // Properties
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
 
     public JmsConfiguration getConfiguration() {
         if (configuration == null) {
@@ -135,12 +134,13 @@
             if (applicationContext != null) {
                 Map beansOfType = applicationContext.getBeansOfType(ConnectionFactory.class);
                 if (!beansOfType.isEmpty()) {
-                    ConnectionFactory cf = (ConnectionFactory) beansOfType.values().iterator().next();
+                    ConnectionFactory cf = (ConnectionFactory)beansOfType.values().iterator().next();
                     configuration.setConnectionFactory(cf);
                 }
                 beansOfType = applicationContext.getBeansOfType(DestinationResolver.class);
                 if (!beansOfType.isEmpty()) {
-                    DestinationResolver destinationResolver = (DestinationResolver) beansOfType.values().iterator().next();
+                    DestinationResolver destinationResolver = (DestinationResolver)beansOfType.values()
+                        .iterator().next();
                     configuration.setDestinationResolver(destinationResolver);
                 }
             }
@@ -323,9 +323,10 @@
                 attemptedToCreateQueueBrowserStrategy = true;
                 try {
                     queueBrowseStrategy = tryCreateDefaultQueueBrowseStrategy();
-                }
-                catch (Throwable e) {
-                    LOG.warn("Could not instantiate the QueueBrowseStrategy are you using Spring 2.0.x by any chance? Error: " + e, e);
+                } catch (Throwable e) {
+                    LOG.warn(
+                             "Could not instantiate the QueueBrowseStrategy are you using Spring 2.0.x by any chance? Error: "
+                                 + e, e);
                 }
             }
         }
@@ -337,7 +338,7 @@
     }
 
     // Implementation methods
-    //-------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
 
     @Override
     protected void doStop() throws Exception {
@@ -348,7 +349,8 @@
     }
 
     @Override
-    protected Endpoint<JmsExchange> createEndpoint(String uri, String remaining, Map parameters) throws Exception {
+    protected Endpoint<JmsExchange> createEndpoint(String uri, String remaining, Map parameters)
+        throws Exception {
 
         boolean pubSubDomain = false;
         if (remaining.startsWith(QUEUE_PREFIX)) {
@@ -399,9 +401,11 @@
     }
 
     /**
-     * Attempts to instantiate the default {@link QueueBrowseStrategy} which should work fine if Spring 2.5.x or later is
-     * on the classpath but this will fail if 2.0.x are on the classpath. We can continue to operate on this version
-     * we just cannot support the browsable queues supported by {@link JmsQueueEndpoint}
+     * Attempts to instantiate the default {@link QueueBrowseStrategy} which
+     * should work fine if Spring 2.5.x or later is on the classpath but this
+     * will fail if 2.0.x are on the classpath. We can continue to operate on
+     * this version we just cannot support the browsable queues supported by
+     * {@link JmsQueueEndpoint}
      *
      * @return the queue browse strategy or null if it cannot be supported
      */
@@ -409,11 +413,11 @@
         // lets try instantiate the default implementation
         Class<?> type = ObjectHelper.loadClass(DEFAULT_QUEUE_BROWSE_STRATEGY);
         if (type == null) {
-            LOG.warn("Could not load class: " + DEFAULT_QUEUE_BROWSE_STRATEGY + " maybe you are on Spring 2.0.x?");
+            LOG.warn("Could not load class: " + DEFAULT_QUEUE_BROWSE_STRATEGY
+                     + " maybe you are on Spring 2.0.x?");
             return null;
-        }
-        else {
-            return (QueueBrowseStrategy) ObjectHelper.newInstance(type);
+        } else {
+            return (QueueBrowseStrategy)ObjectHelper.newInstance(type);
         }
     }
 }

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsQueueEndpoint.java Mon Apr  7 07:40:32 2008
@@ -65,8 +65,7 @@
         QueueBrowseStrategy answer = null;
         try {
             answer = JmsComponent.tryCreateDefaultQueueBrowseStrategy();
-        }
-        catch (Throwable e) {
+        } catch (Throwable e) {
             throw new IllegalArgumentException("Could not create a QueueBrowseStrategy, maybe you are using spring 2.0.x? Cause: " + e, e);
         }
         if (answer == null) {
@@ -74,5 +73,5 @@
         }
         return answer;
     }
-    
+
 }

Modified: activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java (original)
+++ activemq/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/QueueBrowseStrategy.java Mon Apr  7 07:40:32 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-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPath.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPath.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPath.java (original)
+++ activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPath.java Mon Apr  7 07:40:32 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.language.jxpath;
 
+import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
-import java.lang.annotation.ElementType;
 
 import org.apache.camel.language.LanguageAnnotation;
 
@@ -35,5 +34,5 @@
 @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER })
 @LanguageAnnotation(language = "jxpath")
 public @interface JXPath {
-    public abstract String value();
+    String value();
 }

Modified: activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPathLanguage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPathLanguage.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPathLanguage.java (original)
+++ activemq/camel/trunk/components/camel-jxpath/src/main/java/org/apache/camel/language/jxpath/JXPathLanguage.java Mon Apr  7 07:40:32 2008
@@ -22,16 +22,17 @@
 import org.apache.camel.spi.Language;
 
 /**
- * <a href="http://commons.apache.org/jxpath/">JXPath</a> {@link Language} provider
+ * <a href="http://commons.apache.org/jxpath/">JXPath</a> {@link Language}
+ * provider
  */
 public class JXPathLanguage implements Language {
 
-	public Expression<Exchange> createExpression(String expression) {
-		return new JXPathExpression(expression, Object.class);
-	}
+    public Expression<Exchange> createExpression(String expression) {
+        return new JXPathExpression(expression, Object.class);
+    }
 
-	public Predicate<Exchange> createPredicate(String predicate) {
-		return new JXPathExpression(predicate, Boolean.class);
-	}
+    public Predicate<Exchange> createPredicate(String predicate) {
+        return new JXPathExpression(predicate, Boolean.class);
+    }
 
 }

Modified: activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/BeanWithJXPathInjectionTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/BeanWithJXPathInjectionTest.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/BeanWithJXPathInjectionTest.java (original)
+++ activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/BeanWithJXPathInjectionTest.java Mon Apr  7 07:40:32 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,
@@ -18,14 +17,14 @@
 package org.apache.camel.language.jxpath;
 
 
+import javax.naming.Context;
+
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 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: 630568 $
  */
@@ -40,12 +39,12 @@
         assertEquals("bean foo: " + myBean, "James", myBean.name);
         assertNotNull("Should pass body as well", myBean.body);
     }
-    
+
     public void testSendNullMessage() throws Exception {
         template.sendBody("direct:in", new PersonBean(null, "London"));
 
         assertEquals("bean foo: " + myBean, null, myBean.name);
-        assertNotNull("Should pass body as well", myBean.body);        
+        assertNotNull("Should pass body as well", myBean.body);
     }
 
     @Override

Modified: activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/JXPathTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/JXPathTest.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/JXPathTest.java (original)
+++ activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/JXPathTest.java Mon Apr  7 07:40:32 2008
@@ -17,8 +17,6 @@
 package org.apache.camel.language.jxpath;
 
 import org.apache.camel.LanguageTestSupport;
-import org.apache.camel.Exchange;
-import org.apache.camel.Message;
 import org.apache.camel.language.ExpressionEvaluationException;
 
 /**
@@ -29,61 +27,59 @@
     protected PersonBean body = new PersonBean("James", "London");
 
     /**
-	 * Test JXPath expressions
-	 */
-	public void testJXPathExpressions() throws Exception {
-		assertExpression(".", exchange);
-		assertExpression("./in/body", "<hello id='m123'>world!</hello>");
-		assertExpression("in/body", "<hello id='m123'>world!</hello>");
-		assertExpression("in/headers", exchange.getIn().getHeaders());
-		assertExpression("in/headers/@foo", "abc");
-	}
-	
-	/**
-	 * Test JXPath predicates
-	 */
-	public void testJXPathPredicates() throws Exception {
-		assertPredicate("in/headers/@foo = 'abc'");
-	}
-	
-	/**
-	 * Test exceptions being thrown appropriately
-	 */
-	public void testExceptions() throws Exception {
-		assertInvalidExpression(".@.");
-		assertInvalidExpression("ins/body");
-		//assertInvalidPredicate("in/body");
-	}
-/*
-    @Override
-    protected void populateExchange(Exchange exchange) {
-        Message in = exchange.getIn();
-        in.setHeader("foo", "abc");
-        in.setHeader("bar", 123);
-        in.setBody(body);
-    }*/
+     * Test JXPath expressions
+     */
+    public void testJXPathExpressions() throws Exception {
+        assertExpression(".", exchange);
+        assertExpression("./in/body", "<hello id='m123'>world!</hello>");
+        assertExpression("in/body", "<hello id='m123'>world!</hello>");
+        assertExpression("in/headers", exchange.getIn().getHeaders());
+        assertExpression("in/headers/@foo", "abc");
+    }
+
+    /**
+     * Test JXPath predicates
+     */
+    public void testJXPathPredicates() throws Exception {
+        assertPredicate("in/headers/@foo = 'abc'");
+    }
+
+    /**
+     * Test exceptions being thrown appropriately
+     */
+    public void testExceptions() throws Exception {
+        assertInvalidExpression(".@.");
+        assertInvalidExpression("ins/body");
+        // assertInvalidPredicate("in/body");
+    }
+
+    /*
+     * @Override protected void populateExchange(Exchange exchange) { Message in =
+     * exchange.getIn(); in.setHeader("foo", "abc"); in.setHeader("bar", 123);
+     * in.setBody(body); }
+     */
 
     private void assertInvalidExpression(String expression) {
-		try {
-			assertExpression(expression, null);
-			fail("Expected an ExpressionEvaluationException");
-		} catch (ExpressionEvaluationException e) {
-			//nothing to do -- test success
-		}
-	}
-	
-	private void assertInvalidPredicate(String predicate) {
-		try {
-			assertPredicate(predicate);
-			fail("Expected an ExpressionEvaluationException");
-		} catch (ExpressionEvaluationException e) {
-			//nothing to do -- test success
-		}		
-	}
-
-	@Override
-	protected String getLanguageName() {
-		return "jxpath";
-	}
+        try {
+            assertExpression(expression, null);
+            fail("Expected an ExpressionEvaluationException");
+        } catch (ExpressionEvaluationException e) {
+            // nothing to do -- test success
+        }
+    }
+
+    private void assertInvalidPredicate(String predicate) {
+        try {
+            assertPredicate(predicate);
+            fail("Expected an ExpressionEvaluationException");
+        } catch (ExpressionEvaluationException e) {
+            //nothing to do -- test success
+        }
+    }
+
+    @Override
+    protected String getLanguageName() {
+        return "jxpath";
+    }
 
 }

Modified: activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/PersonBean.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/PersonBean.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/PersonBean.java (original)
+++ activemq/camel/trunk/components/camel-jxpath/src/test/java/org/apache/camel/language/jxpath/PersonBean.java Mon Apr  7 07:40:32 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/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/pom.xml?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/components/pom.xml (original)
+++ activemq/camel/trunk/components/pom.xml Mon Apr  7 07:40:32 2008
@@ -1,5 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
 <!--
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
@@ -15,10 +14,7 @@
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
--->
-
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -78,6 +74,7 @@
     <module>camel-xmlbeans</module>
     <module>camel-xmpp</module>
     <module>camel-xstream</module>    
+    <module>camel-spring-integration</module>
   </modules>
 
-</project>
+</project>
\ No newline at end of file

Modified: activemq/camel/trunk/tests/camel-itest-spring-2.0/src/test/java/org/apache/camel/itest/spring2/JmsRouteTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tests/camel-itest-spring-2.0/src/test/java/org/apache/camel/itest/spring2/JmsRouteTest.java?rev=645543&r1=645542&r2=645543&view=diff
==============================================================================
--- activemq/camel/trunk/tests/camel-itest-spring-2.0/src/test/java/org/apache/camel/itest/spring2/JmsRouteTest.java (original)
+++ activemq/camel/trunk/tests/camel-itest-spring-2.0/src/test/java/org/apache/camel/itest/spring2/JmsRouteTest.java Mon Apr  7 07:40:32 2008
@@ -22,8 +22,9 @@
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
 import org.apache.camel.component.mock.MockEndpoint;
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentClientAcknowledge;
+
 
 /**
  * @version $Revision$