camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1291249 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/component/bean/ camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/main/java/org/apache/camel/impl/converter/ camel-core/src/test/java/org/apache/camel/ camel...
Date Mon, 20 Feb 2012 13:27:26 GMT
Author: bvahdat
Date: Mon Feb 20 13:27:25 2012
New Revision: 1291249

URL: http://svn.apache.org/viewvc?rev=1291249&view=rev
Log:
Polished:
- usage of @SuppressWarnings where applicable.
- remove unused imports.
- remove unused variables.
- avoid deprecated API usage.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextLazyLoadTypeConvertersTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java
    camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
    camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsEndpoint.java
    camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointOptionsNotChangeComponentTest.java
    camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpReferenceParameterTest.java
    camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
    camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXEndpointTest.java
    camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java
    camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmEndpoint.java
    camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
    camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneEndpoint.java
    camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java
    camel/trunk/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbFindOperationTest.java
    camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
    camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjConvertersTest.java
    camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.java
    camel/trunk/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringTestContextLoader.java
    camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
    camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java
    camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerPlainTest.java
    camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
    camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
    camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
    camel/trunk/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/mocks/StatusMock.java
    camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RoutesResource.java
    camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RouteStart.java
    camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/internal/CamelControllerImpl.java
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java Mon
Feb 20 13:27:25 2012
@@ -102,6 +102,7 @@ public class MethodInfo {
         }
     }
 
+    @SuppressWarnings("deprecation")
     public MethodInfo(CamelContext camelContext, Class<?> type, Method method, List<ParameterInfo>
parameters, List<ParameterInfo> bodyParameters,
                       boolean hasCustomAnnotation, boolean hasHandlerAnnotation) {
         this.camelContext = camelContext;

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java Mon
Feb 20 13:27:25 2012
@@ -2059,6 +2059,7 @@ public class DefaultCamelContext extends
     /**
      * Lazily create a default implementation
      */
+    @SuppressWarnings("deprecation")
     protected TypeConverter createTypeConverter() {
         BaseTypeConverterRegistry answer;
         if (isLazyLoadTypeConverters()) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
Mon Feb 20 13:27:25 2012
@@ -40,8 +40,7 @@ import org.apache.camel.spi.TypeConverte
 import org.apache.camel.spi.TypeConverterRegistry;
 import org.apache.camel.support.ServiceSupport;
 import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.StopWatch;
-import org.apache.camel.util.TimeUtils;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -384,8 +383,6 @@ public abstract class BaseTypeConverterR
      * Loads the core type converters which is mandatory to use Camel
      */
     public void loadCoreTypeConverters() throws Exception {
-        int before = typeMappings.size();
-
         // load all the type converters from camel-core
         CoreTypeConverterLoader core = new CoreTypeConverterLoader();
         core.load(this);

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/ContextTestSupport.java Mon Feb
20 13:27:25 2012
@@ -175,6 +175,7 @@ public abstract class ContextTestSupport
         }
     }
 
+    @SuppressWarnings("deprecation")
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = new DefaultCamelContext(createRegistry());
         context.setLazyLoadTypeConverters(isLazyLoadingTypeConverter());

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextLazyLoadTypeConvertersTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextLazyLoadTypeConvertersTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextLazyLoadTypeConvertersTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextLazyLoadTypeConvertersTest.java
Mon Feb 20 13:27:25 2012
@@ -29,15 +29,18 @@ public class DefaultCamelContextLazyLoad
 
     private CamelContext context = new DefaultCamelContext();
 
+    @SuppressWarnings("deprecation")
     public void testLazyLoadDefault() throws Exception {
         assertFalse("Default setting should have been true", context.isLazyLoadTypeConverters());
     }
 
+    @SuppressWarnings("deprecation")
     public void testConvertLoadUpFront() throws Exception {
         context.setLazyLoadTypeConverters(false);
         doConvertTest();
     }
 
+    @SuppressWarnings("deprecation")
     public void testConvertLazyLoad() throws Exception {
         context.setLazyLoadTypeConverters(true);
         doConvertTest();

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java
Mon Feb 20 13:27:25 2012
@@ -46,7 +46,7 @@ public class TypeConverterConcurrencyIss
             pool.submit(new Runnable() {
                 @Override
                 public void run() {
-                    MyCamelBean bean = context.getTypeConverter().convertTo(MyCamelBean.class,
"1;MyCamel");
+                    context.getTypeConverter().convertTo(MyCamelBean.class, "1;MyCamel");
                     latch.countDown();
                 }
             });

Modified: camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
(original)
+++ camel/trunk/components/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
Mon Feb 20 13:27:25 2012
@@ -330,6 +330,7 @@ public abstract class AbstractCamelConte
 
     protected abstract void initCustomRegistry(T context);
     
+    @SuppressWarnings("deprecation")
     protected void initLazyLoadTypeConverteres() {
         if (getLazyLoadTypeConverters() != null) {
             getContext().setLazyLoadTypeConverters(getLazyLoadTypeConverters());

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java
Mon Feb 20 13:27:25 2012
@@ -16,20 +16,14 @@
  */
 package org.apache.camel.component.cxf;
 
-import java.io.IOException;
 import java.net.ConnectException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Source;
 import javax.xml.ws.Endpoint;
 
 import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import org.xml.sax.SAXException;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;

Modified: camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsEndpoint.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsEndpoint.java
(original)
+++ camel/trunk/components/camel-hdfs/src/main/java/org/apache/camel/component/hdfs/HdfsEndpoint.java
Mon Feb 20 13:27:25 2012
@@ -29,6 +29,7 @@ public class HdfsEndpoint extends Defaul
 
     private final HdfsConfiguration config;
 
+    @SuppressWarnings("deprecation")
     public HdfsEndpoint(String endpointUri, CamelContext context) throws URISyntaxException
{
         super(endpointUri, context);
         this.config = new HdfsConfiguration();

Modified: camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointOptionsNotChangeComponentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointOptionsNotChangeComponentTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointOptionsNotChangeComponentTest.java
(original)
+++ camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpEndpointOptionsNotChangeComponentTest.java
Mon Feb 20 13:27:25 2012
@@ -67,9 +67,11 @@ public class HttpEndpointOptionsNotChang
         assertIsInstanceOf(MyBinding.class, end3.getBinding());
     }
 
+    @SuppressWarnings("deprecation")
     private static class MyBinding extends DefaultHttpBinding {
     }
 
+    @SuppressWarnings("deprecation")
     private static class MyOtherBinding extends DefaultHttpBinding {
     }
 }

Modified: camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpReferenceParameterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpReferenceParameterTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpReferenceParameterTest.java
(original)
+++ camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpReferenceParameterTest.java
Mon Feb 20 13:27:25 2012
@@ -77,6 +77,7 @@ public class HttpReferenceParameterTest 
         };
     }
 
+    @SuppressWarnings("deprecation")
     private static class TestHttpBinding extends DefaultHttpBinding {
     }
 

Modified: camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
(original)
+++ camel/trunk/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsEndpoint.java
Mon Feb 20 13:27:25 2012
@@ -104,6 +104,7 @@ public class JmsEndpoint extends Default
         this.pubSubDomain = pubSubDomain;
     }
 
+    @SuppressWarnings("deprecation")
     public JmsEndpoint(String endpointUri, JmsBinding binding, JmsConfiguration configuration,
String destinationName, boolean pubSubDomain) {
         super(UnsafeUriCharactersEncoder.encode(endpointUri));
         this.binding = binding;

Modified: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXEndpointTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXEndpointTest.java
(original)
+++ camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/JMXEndpointTest.java
Mon Feb 20 13:27:25 2012
@@ -41,6 +41,7 @@ public class JMXEndpointTest {
     DefaultCamelContext context;
     
     @Before
+    @SuppressWarnings("deprecation")
     public void setUp() throws Exception {
         context = new DefaultCamelContext();
         // saves 5 seconds on this unit test

Modified: camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java
(original)
+++ camel/trunk/components/camel-jmx/src/test/java/org/apache/camel/component/jmx/SimpleBeanFixture.java
Mon Feb 20 13:27:25 2012
@@ -159,6 +159,7 @@ public class SimpleBeanFixture {
      * Initializes the camel context by creating a simple route from our mbean
      * to the mock endpoint.
      */
+    @SuppressWarnings("deprecation")
     protected void initContext() throws Exception {
         mContext.setLazyLoadTypeConverters(true);
         final MockEndpoint mock = mContext.getEndpoint("mock:sink", MockEndpoint.class);

Modified: camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmEndpoint.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmEndpoint.java
(original)
+++ camel/trunk/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400PgmEndpoint.java
Mon Feb 20 13:27:25 2012
@@ -65,6 +65,7 @@ public class Jt400PgmEndpoint extends De
         }
     }
 
+    @SuppressWarnings("deprecation")
     public Jt400PgmEndpoint(String endpointUri, String programToExecute, Map<String, Object>
parameters,
                             CamelContext camelContext) {
         super(endpointUri, camelContext);

Modified: camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
(original)
+++ camel/trunk/components/camel-ldap/src/main/java/org/apache/camel/component/ldap/LdapEndpoint.java
Mon Feb 20 13:27:25 2012
@@ -45,6 +45,7 @@ public class LdapEndpoint extends Defaul
         this.remaining = remaining;
     }
 
+    @SuppressWarnings("deprecation")
     public LdapEndpoint(String endpointUri, String remaining) throws URISyntaxException {
         super(endpointUri);
         this.remaining = remaining;

Modified: camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneEndpoint.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneEndpoint.java
(original)
+++ camel/trunk/components/camel-lucene/src/main/java/org/apache/camel/component/lucene/LuceneEndpoint.java
Mon Feb 20 13:27:25 2012
@@ -31,6 +31,7 @@ public class LuceneEndpoint extends Defa
     public LuceneEndpoint() {
     }
 
+    @SuppressWarnings("deprecation")
     public LuceneEndpoint(String endpointUri, CamelContext camelContext) {
         super(endpointUri, camelContext);
     }
@@ -39,6 +40,7 @@ public class LuceneEndpoint extends Defa
         super(endpointUri, component);
     }
 
+    @SuppressWarnings("deprecation")
     public LuceneEndpoint(String endpointUri) {
         super(endpointUri);
     }

Modified: camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java
(original)
+++ camel/trunk/components/camel-mina2/src/main/java/org/apache/camel/component/mina2/Mina2Producer.java
Mon Feb 20 13:27:25 2012
@@ -104,6 +104,7 @@ public class Mina2Producer extends Defau
         return false;
     }
 
+    @SuppressWarnings("deprecation")
     public void process(Exchange exchange) throws Exception {
         LOG.debug("Mina2Producer process");
 

Modified: camel/trunk/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbFindOperationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbFindOperationTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbFindOperationTest.java
(original)
+++ camel/trunk/components/camel-mongodb/src/test/java/org/apache/camel/component/mongodb/MongoDbFindOperationTest.java
Mon Feb 20 13:27:25 2012
@@ -32,6 +32,7 @@ import org.springframework.context.suppo
 
 public class MongoDbFindOperationTest extends AbstractMongoDbTest {
  
+    
     @Test
     public void testFindAllNoCriteriaOperation() throws Exception {
         // Test that the collection has 0 documents in it
@@ -40,8 +41,10 @@ public class MongoDbFindOperationTest ex
         
         Object result = template.requestBody("direct:findAll", (Object) null);
         assertTrue("Result is not of type List", result instanceof List);
-        
+
+        @SuppressWarnings("unchecked")
         List<DBObject> resultList = (List<DBObject>) result;
+
         assertListSize("Result does not contain all entries in collection", resultList, 1000);
         
         // Ensure that all returned documents contain all fields
@@ -66,8 +69,10 @@ public class MongoDbFindOperationTest ex
         DBObject fieldFilter = BasicDBObjectBuilder.start().add("_id", 0).add("fixedField",
0).get();
         Object result = template.requestBodyAndHeader("direct:findAll", (Object) null, MongoDbConstants.FIELDS_FILTER,
fieldFilter);
         assertTrue("Result is not of type List", result instanceof List);
-        
+
+        @SuppressWarnings("unchecked")
         List<DBObject> resultList = (List<DBObject>) result;
+
         assertListSize("Result does not contain all entries in collection", resultList, 1000);
         
         // Ensure that all returned documents contain all fields
@@ -98,8 +103,10 @@ public class MongoDbFindOperationTest ex
             headers.put(MongoDbConstants.LIMIT, 100);
             Object result = template.requestBodyAndHeaders("direct:findAll", (Object) null,
headers);
             assertTrue("Result is not of type List", result instanceof List);
-            
+
+            @SuppressWarnings("unchecked")
             List<DBObject> resultList = (List<DBObject>) result;
+
             assertListSize("Result does not contain 100 elements", resultList, 100);
             assertEquals("Id of first record is not as expected", numToSkip + 1, Integer.parseInt((String)
resultList.get(0).get("_id")));
             

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
(original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyConfiguration.java
Mon Feb 20 13:27:25 2012
@@ -31,6 +31,7 @@ import org.jboss.netty.channel.ChannelDo
 import org.jboss.netty.channel.ChannelUpstreamHandler;
 import org.jboss.netty.handler.codec.frame.DelimiterBasedFrameDecoder;
 import org.jboss.netty.handler.codec.frame.Delimiters;
+import org.jboss.netty.handler.codec.serialization.ClassResolvers;
 import org.jboss.netty.handler.codec.serialization.ObjectDecoder;
 import org.jboss.netty.handler.codec.serialization.ObjectEncoder;
 import org.jboss.netty.handler.codec.string.StringDecoder;
@@ -145,7 +146,7 @@ public class NettyConfiguration implemen
                 } else {
                     // object serializable is then used
                     encoders.add(new ObjectEncoder());
-                    decoders.add(new ObjectDecoder());
+                    decoders.add(new ObjectDecoder(ClassResolvers.weakCachingResolver(null)));
 
                     LOG.debug("Using object encoders and decoders");
                 }

Modified: camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjConvertersTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjConvertersTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjConvertersTest.java
(original)
+++ camel/trunk/components/camel-quickfix/src/test/java/org/apache/camel/component/quickfixj/QuickfixjConvertersTest.java
Mon Feb 20 13:27:25 2012
@@ -95,6 +95,7 @@ public class QuickfixjConvertersTest {
         assertThat((SessionID)value, is(new SessionID("FIX.4.0", "FOO", "BAR")));
     }
 
+    @SuppressWarnings("deprecation")
     @Test
     public void convertToExchange() {
         SessionID sessionID = new SessionID("FIX.4.0", "FOO", "BAR");
@@ -113,6 +114,7 @@ public class QuickfixjConvertersTest {
         assertThat((String)exchange.getIn().getHeader(QuickfixjEndpoint.MESSAGE_TYPE_KEY),
is(MsgType.ORDER_SINGLE));
     }
 
+    @SuppressWarnings("deprecation")
     @Test
     public void convertToExchangeWithNullMessage() {
         SessionID sessionID = new SessionID("FIX.4.0", "FOO", "BAR");

Modified: camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java
(original)
+++ camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/strategy/RouteboxDispatcher.java
Mon Feb 20 13:27:25 2012
@@ -120,7 +120,8 @@ public class RouteboxDispatcher {
         
         return dispatchUri;
     }
-    
+
+    @SuppressWarnings("deprecation")
     protected List<URI> getInnerContextConsumerList(CamelContext context) throws URISyntaxException
{
         List<URI> consumerList = new ArrayList<URI>();
         List<RouteDefinition> routeDefinitions = context.getRouteDefinitions();

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java
Mon Feb 20 13:27:25 2012
@@ -42,6 +42,7 @@ public abstract class SpringTestSupport 
     protected AbstractXmlApplicationContext applicationContext;
     protected abstract AbstractXmlApplicationContext createApplicationContext();
 
+    @SuppressWarnings("deprecation")
     @Override
     protected void setUp() throws Exception {
         if (isLazyLoadingTypeConverter()) {
@@ -153,6 +154,7 @@ public abstract class SpringTestSupport 
         return 1;
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = SpringCamelContext.springCamelContext(applicationContext);

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.java
Mon Feb 20 13:27:25 2012
@@ -26,7 +26,7 @@ public class SpringTryCatchMustHaveExcep
 
     protected CamelContext createCamelContext() throws Exception {
         try {
-            CamelContext answer = createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.xml");
+            createSpringCamelContext(this, "org/apache/camel/spring/processor/SpringTryCatchMustHaveExceptionConfiguredTest.xml");
             fail("Should have thrown exception");
         } catch (Exception e) {
             assertIsInstanceOf(FailedToCreateRouteException.class, e.getCause());

Modified: camel/trunk/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringTestContextLoader.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringTestContextLoader.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringTestContextLoader.java
(original)
+++ camel/trunk/components/camel-test-spring/src/main/java/org/apache/camel/test/spring/CamelSpringTestContextLoader.java
Mon Feb 20 13:27:25 2012
@@ -355,6 +355,7 @@ public class CamelSpringTestContextLoade
         }
     }
     
+    @SuppressWarnings("deprecation")
     protected void handleLazyLoadTypeConverters(GenericApplicationContext context, Class<?>
testClass) throws Exception {
         final boolean lazy;
         

Modified: camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
(original)
+++ camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest.java
Mon Feb 20 13:27:25 2012
@@ -21,6 +21,7 @@ import org.apache.camel.test.spring.Lazy
 import org.junit.Test;
 import static org.junit.Assert.assertTrue;
 
+@SuppressWarnings("deprecation")
 @LazyLoadTypeConverters(true)
 public class CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedOverrideTest 
         extends CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersInheritedTest {

Modified: camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java
(original)
+++ camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest.java
Mon Feb 20 13:27:25 2012
@@ -21,6 +21,7 @@ import org.apache.camel.test.spring.Lazy
 import org.junit.Test;
 import static org.junit.Assert.assertFalse;
 
+@SuppressWarnings("deprecation")
 @LazyLoadTypeConverters(false)
 public class CamelSpringJUnit4ClassRunnerLazyLoadTypeConvertersTest 
         extends CamelSpringJUnit4ClassRunnerPlainTest {

Modified: camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerPlainTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerPlainTest.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerPlainTest.java
(original)
+++ camel/trunk/components/camel-test-spring/src/test/java/org/apache/camel/test/junit4/CamelSpringJUnit4ClassRunnerPlainTest.java
Mon Feb 20 13:27:25 2012
@@ -124,7 +124,8 @@ public class CamelSpringJUnit4ClassRunne
         assertNull(camelContext.getDebugger());
         assertNull(camelContext2.getDebugger());
     }
-    
+
+    @SuppressWarnings("deprecation")
     @Test
     public void testLazyLoadTypeConverters() {
         assertTrue(camelContext.isLazyLoadTypeConverters());

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
(original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/CamelTestSupport.java
Mon Feb 20 13:27:25 2012
@@ -276,6 +276,7 @@ public abstract class CamelTestSupport e
         }
     }
 
+    @SuppressWarnings("deprecation")
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = new DefaultCamelContext(createRegistry());
         context.setLazyLoadTypeConverters(isLazyLoadingTypeConverter());

Modified: camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
(original)
+++ camel/trunk/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java
Mon Feb 20 13:27:25 2012
@@ -410,6 +410,7 @@ public abstract class CamelTestSupport e
         }
     }
 
+    @SuppressWarnings("deprecation")
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = new DefaultCamelContext(createRegistry());
         context.setLazyLoadTypeConverters(isLazyLoadingTypeConverter());

Modified: camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
(original)
+++ camel/trunk/components/camel-testng/src/main/java/org/apache/camel/testng/CamelTestSupport.java
Mon Feb 20 13:27:25 2012
@@ -418,6 +418,7 @@ public abstract class CamelTestSupport e
         }
     }
 
+    @SuppressWarnings("deprecation")
     protected CamelContext createCamelContext() throws Exception {
         CamelContext context = new DefaultCamelContext(createRegistry());
         context.setLazyLoadTypeConverters(isLazyLoadingTypeConverter());

Modified: camel/trunk/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/mocks/StatusMock.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/mocks/StatusMock.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/mocks/StatusMock.java
(original)
+++ camel/trunk/components/camel-twitter/src/test/java/org/apache/camel/component/twitter/mocks/StatusMock.java
Mon Feb 20 13:27:25 2012
@@ -129,6 +129,7 @@ public class StatusMock implements Statu
     }
 
     @Override
+    @SuppressWarnings("deprecation")
     public Annotations getAnnotations() {
         return null;
     }

Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RoutesResource.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RoutesResource.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RoutesResource.java
(original)
+++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/resources/RoutesResource.java
Mon Feb 20 13:27:25 2012
@@ -71,6 +71,7 @@ public class RoutesResource extends Came
      */
     @GET
     @Produces({MediaType.TEXT_XML, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
+    @SuppressWarnings("deprecation")
     public RoutesDefinition getRouteDefinitions() {
         RoutesDefinition answer = new RoutesDefinition();
         CamelContext camelContext = getCamelContext();

Modified: camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RouteStart.java
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RouteStart.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RouteStart.java
(original)
+++ camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/RouteStart.java
Mon Feb 20 13:27:25 2012
@@ -43,6 +43,7 @@ public class RouteStart extends OsgiComm
         this.camelController = camelController;
     }
 
+    @SuppressWarnings("deprecation")
     public Object doExecute() throws Exception {
         Route camelRoute = camelController.getRoute(route, context);
         if (camelRoute == null) {

Modified: camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/internal/CamelControllerImpl.java
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/internal/CamelControllerImpl.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/internal/CamelControllerImpl.java
(original)
+++ camel/trunk/platforms/karaf/commands/src/main/java/org/apache/camel/karaf/commands/internal/CamelControllerImpl.java
Mon Feb 20 13:27:25 2012
@@ -90,7 +90,7 @@ public class CamelControllerImpl impleme
         return null;
     }
 
-
+    @SuppressWarnings("deprecation")
     public List<RouteDefinition> getRouteDefinitions(String camelContextName) {
         if (camelContextName != null) {
             CamelContext context = this.getCamelContext(camelContextName);
@@ -120,6 +120,7 @@ public class CamelControllerImpl impleme
         return null;
     }
 
+    @SuppressWarnings("deprecation")
     public RouteDefinition getRouteDefinition(String routeId, String camelContextName) {
         CamelContext context = this.getCamelContext(camelContextName);
         if (context == null) {

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java?rev=1291249&r1=1291248&r2=1291249&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java
(original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/blueprint/CamelBlueprint2Test.java
Mon Feb 20 13:27:25 2012
@@ -70,6 +70,7 @@ public class CamelBlueprint2Test extends
         assertEquals(TestProxySender.class.getName(), proxy.getClass().getInterfaces()[0].getName());
     }
 
+    @SuppressWarnings("deprecation")
     @Test
     public void testErrorHandler() throws Exception {
         getInstalledBundle("CamelBlueprintTestBundle14").start();



Mime
View raw message