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/25 08:49:26 UTC
svn commit: r640731 [4/4] - in /activemq/camel/trunk/components:
camel-amqp/src/main/java/org/apache/camel/component/amqp/
camel-amqp/src/test/java/org/apache/camel/component/amqp/
camel-ftp/src/main/java/org/apache/camel/component/file/remote/ camel-f...
Modified: activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/BeanAndMethodELResolver.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/BeanAndMethodELResolver.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/BeanAndMethodELResolver.java (original)
+++ activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/BeanAndMethodELResolver.java Tue Mar 25 00:49:12 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,
@@ -40,15 +39,13 @@
public Object getValue(ELContext elContext, Object base, Object property) {
try {
return super.getValue(elContext, base, property);
- }
- catch (PropertyNotFoundException e) {
+ } catch (PropertyNotFoundException e) {
// lets see if its a method call...
Method method = findMethod(elContext, base, property);
if (method != null) {
elContext.setPropertyResolved(true);
return method;
- }
- else {
+ } else {
throw e;
}
}
Modified: activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/EL.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/EL.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/EL.java (original)
+++ activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/EL.java Tue Mar 25 00:49:12 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.language.juel;
-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 EL (JSP & JSF) expressions into method parameters, fields or properties
*
@@ -33,5 +32,5 @@
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@LanguageAnnotation(language = "el")
public @interface EL {
- public String value();
+ String value();
}
Modified: activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/JuelExpression.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/JuelExpression.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/JuelExpression.java (original)
+++ activemq/camel/trunk/components/camel-juel/src/main/java/org/apache/camel/language/juel/JuelExpression.java Tue Mar 25 00:49:12 2008
@@ -18,12 +18,21 @@
import java.util.Properties;
-import javax.el.*;
-
+import javax.el.ArrayELResolver;
+import javax.el.CompositeELResolver;
+import javax.el.ELContext;
+import javax.el.ELResolver;
+import javax.el.ExpressionFactory;
+import javax.el.ListELResolver;
+import javax.el.MapELResolver;
+import javax.el.ResourceBundleELResolver;
+import javax.el.ValueExpression;
import de.odysseus.el.util.SimpleContext;
import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.camel.impl.ExpressionSupport;
+
+
/**
* The <a href="http://activemq.apache.org/camel/el.html">EL Language from JSP and JSF</a>
Modified: activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/NullBodyTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/NullBodyTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/NullBodyTest.java (original)
+++ activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/NullBodyTest.java Tue Mar 25 00:49:12 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-juel/src/test/java/org/apache/camel/language/juel/issues/XsltLosesHeaderTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/issues/XsltLosesHeaderTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/issues/XsltLosesHeaderTest.java (original)
+++ activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/issues/XsltLosesHeaderTest.java Tue Mar 25 00:49:12 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-juel/src/test/java/org/apache/camel/processor/juel/SimulatorTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/processor/juel/SimulatorTest.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/processor/juel/SimulatorTest.java (original)
+++ activemq/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/processor/juel/SimulatorTest.java Tue Mar 25 00:49:12 2008
@@ -16,13 +16,15 @@
*/
package org.apache.camel.processor.juel;
+
import org.apache.camel.ContextTestSupport;
-import org.apache.camel.Processor;
import org.apache.camel.Exchange;
-import org.apache.camel.Message;
import org.apache.camel.InvalidPayloadException;
-import org.apache.camel.util.ExchangeHelper;
+import org.apache.camel.Message;
+import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.util.ExchangeHelper;
+
import static org.apache.camel.language.juel.JuelExpression.el;
/**
Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/test/TestComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/test/TestComponent.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/test/TestComponent.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/test/TestComponent.java Tue Mar 25 00:49:12 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-spring/src/main/java/org/apache/camel/component/test/TestEndpoint.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/test/TestEndpoint.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/test/TestEndpoint.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/test/TestEndpoint.java Tue Mar 25 00:49:12 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,16 +16,15 @@
*/
package org.apache.camel.component.test;
-import java.util.List;
import java.util.ArrayList;
+import java.util.List;
-import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.Component;
-import org.apache.camel.Service;
import org.apache.camel.Endpoint;
-import org.apache.camel.PollingConsumer;
-import org.apache.camel.Processor;
import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Service;
+import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.util.EndpointHelper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -35,7 +33,7 @@
* A <a href="http://activemq.apache.org/camel/test.html">Test Endpoint</a> is a
* <a href="http://activemq.apache.org/camel/mock.html">Mock Endpoint</a> for testing but it will
* pull all messages from the nested endpoint and use those as expected message body assertions.
- *
+ *
* @version $Revision$
*/
public class TestEndpoint extends MockEndpoint implements Service {
Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java Tue Mar 25 00:49:12 2008
@@ -16,13 +16,13 @@
*/
package org.apache.camel.component.validator;
+import java.util.Map;
+
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.component.ResourceBasedComponent;
import org.apache.camel.impl.ProcessorEndpoint;
import org.springframework.core.io.Resource;
-
-import java.util.Map;
/**
* The <a href="http://activemq.apache.org/camel/validator.html">Validator Component</a>
Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/xslt/XsltComponent.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/xslt/XsltComponent.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/xslt/XsltComponent.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/component/xslt/XsltComponent.java Tue Mar 25 00:49:12 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-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java?rev=640731&r1=640730&r2=640731&view=diff
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java (original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/CamelBeanPostProcessor.java Tue Mar 25 00:49:12 2008
@@ -16,12 +16,28 @@
*/
package org.apache.camel.spring;
-import org.apache.camel.*;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+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.CamelContextAware;
+import org.apache.camel.CamelTemplate;
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.MessageDriven;
+import org.apache.camel.PollingConsumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.Service;
import org.apache.camel.component.bean.BeanProcessor;
import org.apache.camel.spring.util.ReflectionUtils;
import org.apache.camel.util.ObjectHelper;
-import static org.apache.camel.util.ObjectHelper.isNotNullAndNonEmpty;
-import static org.apache.camel.util.ObjectHelper.isNullOrBlank;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
@@ -30,18 +46,14 @@
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
-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 java.lang.reflect.Field;
-import java.lang.reflect.Method;
+import static org.apache.camel.util.ObjectHelper.isNotNullAndNonEmpty;
+import static org.apache.camel.util.ObjectHelper.isNullOrBlank;
/**
* A post processor to perform injection of {@link Endpoint} and
* {@link Producer} instances together with binding methods annotated with
* {@link @MessageDriven} to a Camel consumer.
- *
+ *
* @version $Revision$
*/
@XmlRootElement(name = "beanPostProcessor")
@@ -95,7 +107,7 @@
/**
* A strategy method to allow implementations to perform some custom JBI
* based injection of the POJO
- *
+ *
* @param bean the bean to be injected
*/
protected void injectFields(final Object bean) {