camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1125242 - in /camel/trunk: components/camel-bam/src/main/java/org/apache/camel/bam/ components/camel-cometd/src/main/java/org/apache/camel/component/cometd/ components/camel-cometd/src/test/java/org/apache/camel/component/cometd/ component...
Date Fri, 20 May 2011 05:33:34 GMT
Author: ningjiang
Date: Fri May 20 05:33:33 2011
New Revision: 1125242

URL: http://svn.apache.org/viewvc?rev=1125242&view=rev
Log:
Fixed bunch of eclipse warnings in other camel components

Modified:
    camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
    camel/trunk/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdConsumer.java
    camel/trunk/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/CometdProducerConsumerInteractiveAuthenticatedMain.java
    camel/trunk/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
    camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminConsumer.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpNotStepwiseTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpTest.java
    camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDirectoryToBinaryFilesNotStepwiseTest.java
    camel/trunk/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
    camel/trunk/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcProducerTest.java
    camel/trunk/components/camel-javaspace/src/main/java/org/apache/camel/component/javaspace/JavaSpaceProducer.java
    camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java
    camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java
    camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerSuspendWhileInProgressTest.java
    camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/JuelTest.java
    camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/InvalidConfigurationTest.java
    camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
    camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java
    camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java
    camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java
    camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
    camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
    camel/trunk/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java
    camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java
    camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFilterNoChildTest.java
    camel/trunk/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/ClassLoadingAwareObjectInputStream.java
    camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java
    camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java
    camel/trunk/examples/camel-example-loadbalancing-mina/src/main/java/org/apache/camel/example/service/Reporting.java

Modified: camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
(original)
+++ camel/trunk/components/camel-bam/src/main/java/org/apache/camel/bam/ProcessBuilder.java
Fri May 20 05:33:33 2011
@@ -51,7 +51,6 @@ import static org.apache.camel.util.Obje
  * @version 
  */
 public abstract class ProcessBuilder extends RouteBuilder {
-    private static final transient Logger LOG = LoggerFactory.getLogger(ProcessBuilder.class);
     private static int processCounter;
     private JpaTemplate jpaTemplate;
     private TransactionTemplate transactionTemplate;

Modified: camel/trunk/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdConsumer.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdConsumer.java
(original)
+++ camel/trunk/components/camel-cometd/src/main/java/org/apache/camel/component/cometd/CometdConsumer.java
Fri May 20 05:33:33 2011
@@ -62,6 +62,10 @@ public class CometdConsumer extends Defa
     public CometdEndpoint getEndpoint() {
         return endpoint;
     }
+    
+    public ConsumerService getConsumerService() {
+        return service;
+    }
 
     public static class ConsumerService extends AbstractService {
 

Modified: camel/trunk/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/CometdProducerConsumerInteractiveAuthenticatedMain.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/CometdProducerConsumerInteractiveAuthenticatedMain.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/CometdProducerConsumerInteractiveAuthenticatedMain.java
(original)
+++ camel/trunk/components/camel-cometd/src/test/java/org/apache/camel/component/cometd/CometdProducerConsumerInteractiveAuthenticatedMain.java
Fri May 20 05:33:33 2011
@@ -123,11 +123,11 @@ public class CometdProducerConsumerInter
         public boolean sendMeta(ServerSession to, ServerMessage.Mutable message) {
             if (Channel.META_HANDSHAKE.equals(message.getChannel())) {
                 if (!message.isSuccessful()) {
-                    Map advice = message.getAdvice(true);
+                    Map<String, Object> advice = message.getAdvice(true);
                     advice.put(Message.RECONNECT_FIELD, Message.RECONNECT_HANDSHAKE_VALUE);
 
-                    Map ext = message.getExt(true);
-                    Map authentication = new HashMap();
+                    Map<String, Object> ext = message.getExt(true);
+                    Map<String, Object> authentication = new HashMap<String, Object>();
                     ext.put("authentication", authentication);
                     authentication.put("failed", true);
                     authentication.put("failureReason", "invalid_credentials");

Modified: camel/trunk/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
(original)
+++ camel/trunk/components/camel-crypto/src/test/java/org/apache/camel/component/crypto/SignatureTests.java
Fri May 20 05:33:33 2011
@@ -140,28 +140,28 @@ public class SignatureTests extends Came
 
     @Test
     public void testBasicSignatureRoute() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         sendBody("direct:keypair", payload);
         assertMockEndpointsSatisfied();
     }
 
     @Test
     public void testSetAlgorithmInRouteDefinition() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         sendBody("direct:algorithm", payload);
         assertMockEndpointsSatisfied();
     }
 
     @Test
     public void testSetBufferInRouteDefinition() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         sendBody("direct:buffersize", payload);
         assertMockEndpointsSatisfied();
     }
 
     @Test
     public void testSetRandomInRouteDefinition() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         sendBody("direct:random", payload);
         assertMockEndpointsSatisfied();
     }
@@ -172,28 +172,28 @@ public class SignatureTests extends Came
             return;
         }
         // can only be run on SUN JDK
-        MockEndpoint mock = setupMock();
+        setupMock();
         sendBody("direct:provider", payload);
         assertMockEndpointsSatisfied();
     }
 
     @Test
     public void testSetCertificateInRouteDefinition() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         sendBody("direct:certificate", payload);
         assertMockEndpointsSatisfied();
     }
 
     @Test
     public void testSetKeystoreInRouteDefinition() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         sendBody("direct:keystore", payload);
         assertMockEndpointsSatisfied();
     }
 
     @Test
     public void testSignatureHeaderInRouteDefinition() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         Exchange signed = getMandatoryEndpoint("direct:signature-header").createExchange();
         signed.getIn().setBody(payload);
         template.send("direct:signature-header", signed);
@@ -204,7 +204,7 @@ public class SignatureTests extends Came
 
     @Test
     public void testProvideAliasInHeader() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
 
         // START SNIPPET: alias-send
         Exchange unsigned = getMandatoryEndpoint("direct:alias-sign").createExchange();
@@ -224,7 +224,7 @@ public class SignatureTests extends Came
 
     @Test
     public void testProvideKeysInHeader() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         Exchange unsigned = getMandatoryEndpoint("direct:headerkey-sign").createExchange();
         unsigned.getIn().setBody(payload);
 
@@ -246,7 +246,7 @@ public class SignatureTests extends Came
 
     @Test
     public void testProvideCertificateInHeader() throws Exception {
-        MockEndpoint mock = setupMock();
+        setupMock();
         Exchange unsigned = getMandatoryEndpoint("direct:signature-property").createExchange();
         unsigned.getIn().setBody(payload);
 

Modified: camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminConsumer.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminConsumer.java
(original)
+++ camel/trunk/components/camel-eventadmin/src/main/java/org/apache/camel/component/eventadmin/EventAdminConsumer.java
Fri May 20 05:33:33 2011
@@ -34,7 +34,7 @@ public class EventAdminConsumer extends 
     private static final transient Logger LOG = LoggerFactory.getLogger(EventAdminConsumer.class);
     private final EventAdminEndpoint endpoint;
     private ServiceRegistration registration;
-    private Executor executor;
+    
 
     public EventAdminConsumer(EventAdminEndpoint endpoint, Processor processor) {
         super(endpoint, processor);

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpNotStepwiseTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpNotStepwiseTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpNotStepwiseTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpNotStepwiseTest.java
Fri May 20 05:33:33 2011
@@ -21,7 +21,7 @@ package org.apache.camel.component.file.
  */
 public class FromFileToFtpNotStepwiseTest extends FromFileToFtpTest {
 
-    private String getFtpUrl() {
+    protected String getFtpUrl() {
         return "ftp://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=3000&stepwise=false";
     }
 

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFileToFtpTest.java
Fri May 20 05:33:33 2011
@@ -25,7 +25,7 @@ import org.junit.Test;
  */
 public class FromFileToFtpTest extends FtpServerTestSupport {
 
-    private String getFtpUrl() {
+    protected String getFtpUrl() {
         return "ftp://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=3000";
     }
 

Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDirectoryToBinaryFilesNotStepwiseTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDirectoryToBinaryFilesNotStepwiseTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDirectoryToBinaryFilesNotStepwiseTest.java
(original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FromFtpDirectoryToBinaryFilesNotStepwiseTest.java
Fri May 20 05:33:33 2011
@@ -22,7 +22,7 @@ package org.apache.camel.component.file.
  */
 public class FromFtpDirectoryToBinaryFilesNotStepwiseTest extends FromFtpDirectoryToBinaryFilesTest
{
 
-    private String getFtpUrl() {
+    protected String getFtpUrl() {
         return "ftp://admin@localhost:" + getPort() + "/incoming/?password=admin"
                 + "&binary=true&useFixedDelay=false&recursive=false&delay=5000&stepwise=false";
     }

Modified: camel/trunk/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
(original)
+++ camel/trunk/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSedaConfigurationTest.java
Fri May 20 05:33:33 2011
@@ -58,6 +58,6 @@ public class HazelcastSedaConfigurationT
     @Test(expected = IllegalArgumentException.class)
     public void createEndpointWithoutEmptyName() throws Exception {
         HazelcastComponent hzlqComponent = new HazelcastComponent(context);
-        final HazelcastSedaEndpoint hzlqEndpoint = (HazelcastSedaEndpoint) hzlqComponent.createEndpoint("hazelcast:seda:
?concurrentConsumers=4");
+        hzlqComponent.createEndpoint("hazelcast:seda: ?concurrentConsumers=4");
     }
 }

Modified: camel/trunk/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcProducerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcProducerTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcProducerTest.java
(original)
+++ camel/trunk/components/camel-irc/src/test/java/org/apache/camel/component/irc/IrcProducerTest.java
Fri May 20 05:33:33 2011
@@ -35,7 +35,6 @@ import static org.mockito.Mockito.when;
 public class IrcProducerTest {
 
     private IRCConnection connection;
-    private Processor processor;
     private IrcEndpoint endpoint;
     private IrcConfiguration configuration;
     private IrcProducer producer;
@@ -47,7 +46,6 @@ public class IrcProducerTest {
     public void doSetup() {
         connection = mock(IRCConnection.class);
         endpoint = mock(IrcEndpoint.class);
-        processor = mock(Processor.class);
         configuration = mock(IrcConfiguration.class);
         listener = mock(IRCEventAdapter.class);
         exchange = mock(Exchange.class);

Modified: camel/trunk/components/camel-javaspace/src/main/java/org/apache/camel/component/javaspace/JavaSpaceProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-javaspace/src/main/java/org/apache/camel/component/javaspace/JavaSpaceProducer.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-javaspace/src/main/java/org/apache/camel/component/javaspace/JavaSpaceProducer.java
(original)
+++ camel/trunk/components/camel-javaspace/src/main/java/org/apache/camel/component/javaspace/JavaSpaceProducer.java
Fri May 20 05:33:33 2011
@@ -79,42 +79,39 @@ public class JavaSpaceProducer extends D
         } else {
             entry = (Entry) body;
         }
+ 
+        Transaction tnx = null;
+        if (transactionHelper != null) {
+            tnx = transactionHelper.getJiniTransaction(transactionTimeout).transaction;
+        }
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Writing body : " + entry);
+        }
+        javaSpace.write(entry, tnx, Lease.FOREVER);
 
-        if (entry == null) {
-            LOG.warn("No payload for exchange: " + exchange);
-        } else {
-            Transaction tnx = null;
-            if (transactionHelper != null) {
-                tnx = transactionHelper.getJiniTransaction(transactionTimeout).transaction;
+        if (ExchangeHelper.isOutCapable(exchange)) {
+            OutEntry tmpl = new OutEntry();
+            tmpl.correlationId = ((InEntry)entry).correlationId;
+
+            OutEntry replyCamelEntry = null;
+            while (replyCamelEntry == null) {
+                replyCamelEntry = (OutEntry)javaSpace.take(tmpl, tnx, 100);
             }
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Writing body : " + entry);
-            }
-            javaSpace.write(entry, tnx, Lease.FOREVER);
 
-            if (ExchangeHelper.isOutCapable(exchange)) {
-                OutEntry tmpl = new OutEntry();
-                tmpl.correlationId = ((InEntry) entry).correlationId;
-
-                OutEntry replyCamelEntry = null;
-                while (replyCamelEntry == null) {
-                    replyCamelEntry = (OutEntry) javaSpace.take(tmpl, tnx, 100);
-                }
-
-                Object obj;
-                if (replyCamelEntry.binary) {
-                    obj = replyCamelEntry.buffer;
-                } else {
-                    ByteArrayInputStream bis = new ByteArrayInputStream(replyCamelEntry.buffer);
-                    ObjectInputStream ois = new ObjectInputStream(bis);
-                    obj = ois.readObject();
-                }
-                exchange.getOut().setBody(obj);
-            }
-            if (tnx != null) {
-                tnx.commit();
+            Object obj;
+            if (replyCamelEntry.binary) {
+                obj = replyCamelEntry.buffer;
+            } else {
+                ByteArrayInputStream bis = new ByteArrayInputStream(replyCamelEntry.buffer);
+                ObjectInputStream ois = new ObjectInputStream(bis);
+                obj = ois.readObject();
             }
+            exchange.getOut().setBody(obj);
+        }
+        if (tnx != null) {
+            tnx.commit();
         }
+        
     }
 
     @Override

Modified: camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java
(original)
+++ camel/trunk/components/camel-javaspace/src/test/java/org/apache/camel/component/javaspace/JavaSpaceRequestReplyTest.java
Fri May 20 05:33:33 2011
@@ -38,8 +38,7 @@ import org.springframework.context.suppo
 public class JavaSpaceRequestReplyTest extends CamelTestSupport {
 
     private ClassPathXmlApplicationContext spring;
-
-    @SuppressWarnings("unchecked")
+    
     @Test
     public void testJavaSpaceRequestReply() throws Exception {
         Endpoint endpoint = context.getEndpoint("direct:input");
@@ -55,7 +54,6 @@ public class JavaSpaceRequestReplyTest e
         System.out.println(stop - start);
     }
 
-    @SuppressWarnings("unchecked")
     @Test
     public void testJavaSpaceConcurrentRequestReply() throws Exception {
         Vector<FutureTask<Reply>> tasks = new Vector<FutureTask<Reply>>();

Modified: camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java
(original)
+++ camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/JettySuspendWhileInProgressTest.java
Fri May 20 05:33:33 2011
@@ -44,7 +44,7 @@ public class JettySuspendWhileInProgress
             public void run() {
                 try {
                     Thread.sleep(2000);
-                    JettySuspendWhileInProgressTest.this.context.stop();
+                    context.stop();
                 } catch (Exception e) {
                     // ignore
                 }

Modified: camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerSuspendWhileInProgressTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerSuspendWhileInProgressTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerSuspendWhileInProgressTest.java
(original)
+++ camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/jettyproducer/JettyHttpProducerSuspendWhileInProgressTest.java
Fri May 20 05:33:33 2011
@@ -52,7 +52,7 @@ public class JettyHttpProducerSuspendWhi
             public void run() {
                 try {
                     Thread.sleep(2000);
-                    JettyHttpProducerSuspendWhileInProgressTest.this.context.stop();
+                    context.stop();
                 } catch (Exception e) {
                     // ignore
                 }

Modified: camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/JuelTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/JuelTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/JuelTest.java
(original)
+++ camel/trunk/components/camel-juel/src/test/java/org/apache/camel/language/juel/JuelTest.java
Fri May 20 05:33:33 2011
@@ -22,13 +22,15 @@ import javax.el.ValueExpression;
 
 import de.odysseus.el.ExpressionFactoryImpl;
 import de.odysseus.el.util.SimpleContext;
-import junit.framework.TestCase;
+
+import org.junit.Assert;
 import org.junit.Test;
 
+
 /**
  * @version 
  */
-public class JuelTest extends TestCase {
+public class JuelTest extends Assert {
 
     @Test
     public void testJuel() throws Exception {

Modified: camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/InvalidConfigurationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/InvalidConfigurationTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/InvalidConfigurationTest.java
(original)
+++ camel/trunk/components/camel-mail/src/test/java/org/apache/camel/component/mail/InvalidConfigurationTest.java
Fri May 20 05:33:33 2011
@@ -29,7 +29,7 @@ public class InvalidConfigurationTest ex
 
     @Test
     public void testSMTPCanNotBeUsedForConsumingMails() throws Exception {
-        Endpoint endpoint = this.context.getEndpoint("smtp://localhost?username=james");
+        Endpoint endpoint = context.getEndpoint("smtp://localhost?username=james");
         PollingConsumer consumer = endpoint.createPollingConsumer();
         try {
             consumer.start();
@@ -41,7 +41,7 @@ public class InvalidConfigurationTest ex
 
     @Test
     public void testSMTPSCanNotBeUsedForConsumingMails() throws Exception {
-        Endpoint endpoint = this.context.getEndpoint("smtps://localhost?username=james");
+        Endpoint endpoint = context.getEndpoint("smtps://localhost?username=james");
         PollingConsumer consumer = endpoint.createPollingConsumer();
         try {
             consumer.start();
@@ -54,7 +54,7 @@ public class InvalidConfigurationTest ex
     @Test
     public void testNNTPNotSupported() throws Exception {
         try {
-            this.context.getEndpoint("nntp://localhost?username=james");
+            context.getEndpoint("nntp://localhost?username=james");
             fail("Should have thrown UnsupportedOperationException");
         } catch (ResolveEndpointFailedException e) {
             // expected

Modified: camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
(original)
+++ camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterConfiguration.java
Fri May 20 05:33:33 2011
@@ -28,7 +28,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class PrinterConfiguration {
-    private static final transient Logger LOG = LoggerFactory.getLogger(PrinterConfiguration.class);
     private URI uri;
     private String hostname;
     private int port;

Modified: camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java
(original)
+++ camel/trunk/components/camel-printer/src/main/java/org/apache/camel/component/printer/PrinterProducer.java
Fri May 20 05:33:33 2011
@@ -35,7 +35,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class PrinterProducer extends DefaultProducer {
-    private static final transient Logger LOG = LoggerFactory.getLogger(PrinterProducer.class);
     private final PrinterConfiguration config;
     private PrinterOperations printerOperations;
     private PrintService printService;

Modified: camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java
(original)
+++ camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/MultiplePoliciesOnRouteTest.java
Fri May 20 05:33:33 2011
@@ -34,7 +34,6 @@ import org.slf4j.LoggerFactory;
  * @version 
  */
 public class MultiplePoliciesOnRouteTest extends CamelTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(MultiplePoliciesOnRouteTest.class);
     private String url = "seda:foo?concurrentConsumers=20";
     private int size = 100;
     

Modified: camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java
(original)
+++ camel/trunk/components/camel-quartz/src/test/java/org/apache/camel/routepolicy/quartz/SimpleScheduledCombinedRoutePolicyTest.java
Fri May 20 05:33:33 2011
@@ -31,7 +31,6 @@ import org.slf4j.LoggerFactory;
  * @version 
  */
 public class SimpleScheduledCombinedRoutePolicyTest extends CamelTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(SimpleScheduledCombinedRoutePolicyTest.class);
     
     /* (non-Javadoc)
      * @see org.apache.camel.test.junit4.CamelTestSupport#s;etUp()

Modified: camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
(original)
+++ camel/trunk/components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiRouteTest.java
Fri May 20 05:33:33 2011
@@ -37,8 +37,7 @@ public class RmiRouteTest extends Assert
     protected int getPort() {
         return 37541;
     }
-
-    @SuppressWarnings("unchecked")
+    
     @Test
     public void testPojoRoutes() throws Exception {
         if (classPathHasSpaces()) {

Modified: camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
(original)
+++ camel/trunk/components/camel-routebox/src/main/java/org/apache/camel/component/routebox/RouteboxConfiguration.java
Fri May 20 05:33:33 2011
@@ -61,6 +61,7 @@ public class RouteboxConfiguration {
         this.uri = uri;
     }
 
+    @SuppressWarnings("unchecked")
     public void parseURI(URI uri, Map<String, Object> parameters, RouteboxComponent
component) throws Exception {
         String protocol = uri.getScheme();
         

Modified: camel/trunk/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java
(original)
+++ camel/trunk/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java
Fri May 20 05:33:33 2011
@@ -29,8 +29,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class PublishSubscribeTest extends CamelTestSupport {
-    private static final transient Logger LOG = LoggerFactory.getLogger(PublishSubscribeTest.class);
-
+    
     @EndpointInject(uri = "mock:neverland")
     protected MockEndpoint unreachableEndpoint;
 

Modified: camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java
(original)
+++ camel/trunk/components/camel-spring-integration/src/test/java/org/apache/camel/component/spring/integration/adapter/CamelTargetAdapterTest.java
Fri May 20 05:33:33 2011
@@ -46,7 +46,7 @@ public class CamelTargetAdapterTest exte
     public void testSendingTwoWayMessage() throws Exception {
 
         MessageChannel requestChannel = (MessageChannel) applicationContext.getBean("channelB");
-        Message message = new GenericMessage(MESSAGE_BODY);
+        Message message = new GenericMessage<Object>(MESSAGE_BODY);
         //Need to subscribe the responseChannel first
         DirectChannel responseChannel = (DirectChannel) applicationContext.getBean("channelC");
         responseChannel.subscribe(new MessageHandler() {

Modified: camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java
(original)
+++ camel/trunk/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/ConsumerEndpointMappingRouteTest.java
Fri May 20 05:33:33 2011
@@ -84,10 +84,6 @@ public class ConsumerEndpointMappingRout
 
     @Test(expected = WebServiceIOException.class)
     public void testWrongSoapAction() throws Exception {
-        if (isJava15()) {
-            // does not work on JDK 1.5 due net.javacrumbs.spring-ws-test is not JDK 1.5
compatible
-            throw new WebServiceIOException("Forced by JDK 1.5");
-        }
         StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
         webServiceTemplate.sendSourceAndReceive(source, new SoapActionCallback("http://this-is-a-wrong-soap-action"),
NOOP_SOURCE_EXTRACTOR);
         resultEndpointSoapAction.assertIsNotSatisfied();
@@ -111,10 +107,6 @@ public class ConsumerEndpointMappingRout
 
     @Test(expected = WebServiceIOException.class)
     public void testWrongUri() throws Exception {
-        if (isJava15()) {
-            // does not work on JDK 1.5 due net.javacrumbs.spring-ws-test is not JDK 1.5
compatible
-            throw new WebServiceIOException("Forced by JDK 1.5");
-        }
         StreamSource source = new StreamSource(new StringReader(xmlRequestForGoogleStockQuoteNoNamespace));
         webServiceTemplate.sendSourceAndReceive("http://localhost/wrong", source, NOOP_SOURCE_EXTRACTOR);
         resultEndpointUri.assertIsNotSatisfied();

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFilterNoChildTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFilterNoChildTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFilterNoChildTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/processor/SpringFilterNoChildTest.java
Fri May 20 05:33:33 2011
@@ -30,7 +30,7 @@ public class SpringFilterNoChildTest ext
     @Override
     protected AbstractXmlApplicationContext createApplicationContext() {
         try {
-            ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("org/apache/camel/spring/processor/filterNoChild.xml");
+            new ClassPathXmlApplicationContext("org/apache/camel/spring/processor/filterNoChild.xml");
             fail("Should thrown an exception");
         } catch (RuntimeCamelException e) {
             FailedToCreateRouteException cause = assertIsInstanceOf(FailedToCreateRouteException.class,
e.getCause());

Modified: camel/trunk/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/ClassLoadingAwareObjectInputStream.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/ClassLoadingAwareObjectInputStream.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/ClassLoadingAwareObjectInputStream.java
(original)
+++ camel/trunk/components/camel-sql/src/main/java/org/apache/camel/processor/aggregate/jdbc/ClassLoadingAwareObjectInputStream.java
Fri May 20 05:33:33 2011
@@ -39,13 +39,13 @@ public class ClassLoadingAwareObjectInpu
     }
 
     @Override
-    protected Class resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException
{
+    protected Class<?> resolveClass(ObjectStreamClass classDesc) throws IOException,
ClassNotFoundException {
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         return load(classDesc.getName(), cl);
     }
 
     @Override
-    protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException
{
+    protected Class<?> resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException
{
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
         Class[] cinterfaces = new Class[interfaces.length];
         for (int i = 0; i < interfaces.length; i++) {

Modified: camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java
(original)
+++ camel/trunk/components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityDataFormatTest.java
Fri May 20 05:33:33 2011
@@ -221,10 +221,6 @@ public class XMLSecurityDataFormatTest e
 
             Document d = createDocumentfromInputStream(new ByteArrayInputStream(body));
 
-            // write to a string
-            XmlConverter converter = new XmlConverter();
-            String xmlStr = converter.toString(d, exchange);
-
             NodeList nodeList = d.getElementsByTagNameNS("http://www.w3.org/2001/04/xmlenc#",
"EncryptedData");
             if (nodeList.getLength() >= 0) {
                 assertTrue(true);
@@ -241,10 +237,6 @@ public class XMLSecurityDataFormatTest e
 
             Document d = createDocumentfromInputStream(new ByteArrayInputStream(body));
 
-            // write to a string
-            XmlConverter converter = new XmlConverter();
-            String xmlStr = converter.toString(d, exchange);
-
             NodeList nodeList = d.getElementsByTagNameNS("http://www.w3.org/2001/04/xmlenc#",
"EncryptedData");
             if (nodeList.getLength() == 0) {
                 assertTrue(true);

Modified: camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java
(original)
+++ camel/trunk/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConfigurationTest.java
Fri May 20 05:33:33 2011
@@ -68,8 +68,8 @@ public class XStreamConfigurationTest ex
         String ordereString = "<?xml version='1.0' encoding='UTF-8'?>" + "<purchase-order
name=\"Tiger\" price=\"99.95\" amount=\"1.0\"/>";
         mock.expectedBodiesReceived(new Object[] {ordereString, order});
 
-        this.template.sendBody("direct:marshal", order);
-        this.template.sendBody("direct:unmarshal", ordereString);
+        template.sendBody("direct:marshal", order);
+        template.sendBody("direct:unmarshal", ordereString);
 
         mock.assertIsSatisfied();
     }
@@ -89,8 +89,8 @@ public class XStreamConfigurationTest ex
                 + "<double>11.5</double><double>97.5</double>" +
"</org.apache.camel.dataformat.xstream.PurchaseHistory>";
         mock.expectedBodiesReceived(new Object[] {ordereString, history});
 
-        this.template.sendBody("direct:marshal", history);
-        this.template.sendBody("direct:unmarshal", ordereString);
+        template.sendBody("direct:marshal", history);
+        template.sendBody("direct:unmarshal", ordereString);
 
         mock.assertIsSatisfied();
     }
@@ -108,8 +108,8 @@ public class XStreamConfigurationTest ex
         String ordereString = "{\"purchase-order\":{\"@name\":\"Tiger\",\"@price\":\"99.95\",\"@amount\":\"1.0\"}}";
         mock.expectedBodiesReceived(new Object[] {ordereString, order});
 
-        this.template.sendBody("direct:marshal-json", order);
-        this.template.sendBody("direct:unmarshal-json", ordereString);
+        template.sendBody("direct:marshal-json", order);
+        template.sendBody("direct:unmarshal-json", ordereString);
 
         mock.assertIsSatisfied();
     }
@@ -124,7 +124,7 @@ public class XStreamConfigurationTest ex
         order.setAmount(1);
         order.setPrice(99.95);
                 
-        this.template.sendBody("direct:myDriver", order);
+        template.sendBody("direct:myDriver", order);
         mock.assertIsSatisfied();
         String result = mock.getExchanges().get(0).getIn().getBody(String.class);
         // make sure the result is start with "{"

Modified: camel/trunk/examples/camel-example-loadbalancing-mina/src/main/java/org/apache/camel/example/service/Reporting.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-loadbalancing-mina/src/main/java/org/apache/camel/example/service/Reporting.java?rev=1125242&r1=1125241&r2=1125242&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-loadbalancing-mina/src/main/java/org/apache/camel/example/service/Reporting.java
(original)
+++ camel/trunk/examples/camel-example-loadbalancing-mina/src/main/java/org/apache/camel/example/service/Reporting.java
Fri May 20 05:33:33 2011
@@ -23,8 +23,7 @@ import org.apache.camel.Processor;
 import org.apache.camel.example.model.Report;
 
 public class Reporting implements Processor {
-
-    private static Integer count;
+    
 
     public void process(Exchange exchange) throws Exception {
     }



Mime
View raw message