camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadr...@apache.org
Subject svn commit: r1396815 - in /camel/branches/camel-2.9.x: camel-core/src/main/java/org/apache/camel/component/seda/ camel-core/src/main/java/org/apache/camel/processor/loadbalancer/ camel-core/src/test/java/org/apache/camel/impl/ camel-core/src/test/java/...
Date Wed, 10 Oct 2012 21:49:44 GMT
Author: hadrian
Date: Wed Oct 10 21:49:44 2012
New Revision: 1396815

URL: http://svn.apache.org/viewvc?rev=1396815&view=rev
Log:
CS fixing. Preparing release

Modified:
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
    camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/RandomLoadBalancer.java
    camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
    camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/issues/RedeliveryPolicyOnExceptionWhileRedeliveringIssueTest.java
    camel/branches/camel-2.9.x/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java
    camel/branches/camel-2.9.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsMessageAsOriginalMessageInDefaultUnitOfWorkTest.java
    camel/branches/camel-2.9.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerAcceptContentTypeTest.java
    camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamEndpoint.java
    camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamProducer.java
    camel/branches/camel-2.9.x/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamSystemOutTest.java
    camel/branches/camel-2.9.x/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
Wed Oct 10 21:49:44 2012
@@ -308,8 +308,8 @@ public class SedaConsumer extends Servic
         shutdownExecutor();
     }
 
-	private void shutdownExecutor() {
-	    if (executor != null) {
+    private void shutdownExecutor() {
+        if (executor != null) {
             endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor);
             executor = null;
         }

Modified: camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/RandomLoadBalancer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/RandomLoadBalancer.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/RandomLoadBalancer.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/RandomLoadBalancer.java
Wed Oct 10 21:49:44 2012
@@ -29,7 +29,7 @@ import org.apache.camel.Processor;
  */
 public class RandomLoadBalancer extends QueueLoadBalancer {
 
-    private static final Random random = new Random();
+    private static final Random RANDOM = new Random();
 
     protected synchronized Processor chooseProcessor(List<Processor> processors, Exchange
exchange) {
         int size = processors.size();
@@ -41,7 +41,7 @@ public class RandomLoadBalancer extends 
         }
 
         // pick a random
-        int index = random.nextInt(size);
+        int index = RANDOM.nextInt(size);
         return processors.get(index);
     }
 

Modified: camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerCacheTest.java
Wed Oct 10 21:49:44 2012
@@ -30,7 +30,7 @@ import org.apache.camel.Producer;
  */
 public class DefaultProducerCacheTest extends ContextTestSupport {
 
-    private static final AtomicInteger counter = new AtomicInteger();
+    private static final AtomicInteger COUNTER = new AtomicInteger();
 
     public void testCacheProducerAcquireAndRelease() throws Exception {
         ProducerCache cache = new ProducerCache(this, context);
@@ -64,15 +64,15 @@ public class DefaultProducerCacheTest ex
         assertEquals("Size should be 5", 5, cache.size());
 
         // should have stopped the 3 evicted
-        assertEquals(3, counter.get());
+        assertEquals(3, COUNTER.get());
 
         cache.stop();
 
         // should have stopped all 8
-        assertEquals(8, counter.get());
+        assertEquals(8, COUNTER.get());
     }
 
-    private class MyEndpoint extends DefaultEndpoint {
+    private final class MyEndpoint extends DefaultEndpoint {
 
         private int number;
 
@@ -114,7 +114,7 @@ public class DefaultProducerCacheTest ex
 
         @Override
         protected void doStop() throws Exception {
-            counter.incrementAndGet();
+            COUNTER.incrementAndGet();
         }
     }
 

Modified: camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/issues/RedeliveryPolicyOnExceptionWhileRedeliveringIssueTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/issues/RedeliveryPolicyOnExceptionWhileRedeliveringIssueTest.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/issues/RedeliveryPolicyOnExceptionWhileRedeliveringIssueTest.java
(original)
+++ camel/branches/camel-2.9.x/camel-core/src/test/java/org/apache/camel/issues/RedeliveryPolicyOnExceptionWhileRedeliveringIssueTest.java
Wed Oct 10 21:49:44 2012
@@ -39,12 +39,12 @@ public class RedeliveryPolicyOnException
             String camelRedeliveryCounter = exchange.getIn().getHeader(Exchange.REDELIVERY_COUNTER,
String.class);
             int redeliveries = camelRedeliveryCounter == null ? 0 : Integer.valueOf(camelRedeliveryCounter);
             switch (redeliveries) {
-                case 0:
-                    throw new FirstException();
-                case 1:
-                    throw new SecondException();
-                default:
-                    break; // no-op
+            case 0:
+                throw new FirstException();
+            case 1:
+                throw new SecondException();
+            default:
+                break; // no-op
             }
         }
     }

Modified: camel/branches/camel-2.9.x/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-jaxb/src/test/java/org/apache/camel/jaxb/SplitterAndExceptionRouteTwistIssueTest.java
Wed Oct 10 21:49:44 2012
@@ -51,7 +51,7 @@ public class SplitterAndExceptionRouteTw
     protected MockEndpoint mockRejectEndpoint;
 
     @EndpointInject(uri = "mock:mock_output")
-    protected MockEndpoint mock_output;
+    protected MockEndpoint mockOutput;
 
     @Test
     public void testErrorHandlingJaxb() throws Exception {
@@ -59,7 +59,7 @@ public class SplitterAndExceptionRouteTw
         String errorExample = "myerror\u0010";
 
         mockRejectEndpoint.expectedMessageCount(1);
-        mock_output.expectedMessageCount(4);
+        mockOutput.expectedMessageCount(4);
 
         templateError.sendBody(correctExample);
         templateError.sendBody(errorExample);
@@ -68,7 +68,7 @@ public class SplitterAndExceptionRouteTw
         templateError.sendBody(correctExample);
 
         mockRejectEndpoint.assertIsSatisfied();
-        mock_output.assertIsSatisfied();
+        mockOutput.assertIsSatisfied();
     }
 
     @Test
@@ -77,7 +77,7 @@ public class SplitterAndExceptionRouteTw
         String errorExample = "myerror\u0010";
 
         mockRejectEndpoint.expectedMessageCount(1);
-        mock_output.expectedMessageCount(4);
+        mockOutput.expectedMessageCount(4);
 
         templateError2.sendBody(correctExample);
         templateError2.sendBody(errorExample);
@@ -86,7 +86,7 @@ public class SplitterAndExceptionRouteTw
         templateError2.sendBody(correctExample);
 
         mockRejectEndpoint.assertIsSatisfied();
-        mock_output.assertIsSatisfied();
+        mockOutput.assertIsSatisfied();
     }
 
     @Override
@@ -123,7 +123,7 @@ public class SplitterAndExceptionRouteTw
                         }
                     })
                     .split().xpath("//twits/twit").streaming()
-                    .to(mock_output);
+                    .to(mockOutput);
 
 
                 from("direct:error2")
@@ -147,7 +147,7 @@ public class SplitterAndExceptionRouteTw
                         }
                     })
                     .split().xpath("//twits/twit").streaming()
-                    .to(mock_output);
+                    .to(mockOutput);
             }
         };
     }

Modified: camel/branches/camel-2.9.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsMessageAsOriginalMessageInDefaultUnitOfWorkTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsMessageAsOriginalMessageInDefaultUnitOfWorkTest.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsMessageAsOriginalMessageInDefaultUnitOfWorkTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsMessageAsOriginalMessageInDefaultUnitOfWorkTest.java
Wed Oct 10 21:49:44 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.jms;
 
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
 
 import javax.jms.ConnectionFactory;
 
@@ -27,6 +26,8 @@ import org.apache.camel.component.mock.M
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 
+import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
+
 public class JmsMessageAsOriginalMessageInDefaultUnitOfWorkTest extends CamelTestSupport
{
 
     @EndpointInject(uri = "mock:result")

Modified: camel/branches/camel-2.9.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerAcceptContentTypeTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerAcceptContentTypeTest.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerAcceptContentTypeTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletProducerAcceptContentTypeTest.java
Wed Oct 10 21:49:44 2012
@@ -32,7 +32,7 @@ public class RestletProducerAcceptConten
             @Override
             public void configure() throws Exception {                
                 
-                from("jetty://http://localhost:" + + portNum + "/users")
+                from("jetty://http://localhost:" + portNum + "/users")
                     .process(new Processor() {                    
                         public void process(Exchange exchange) throws Exception {
                             String body = exchange.getIn().getBody(String.class);

Modified: camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamEndpoint.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamEndpoint.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamEndpoint.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamEndpoint.java
Wed Oct 10 21:49:44 2012
@@ -41,7 +41,7 @@ public class StreamEndpoint extends Defa
     private long promptDelay;
     private long initialPromptDelay = 2000;
     private int groupLines;
-    private int autoCloseCount = 0;
+    private int autoCloseCount;
     
     private Charset charset;
 

Modified: camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamProducer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamProducer.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamProducer.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-stream/src/main/java/org/apache/camel/component/stream/StreamProducer.java
Wed Oct 10 21:49:44 2012
@@ -71,7 +71,7 @@ public class StreamProducer extends Defa
     public void process(Exchange exchange) throws Exception {
         delay(endpoint.getDelay());
 
-        synchronized(this) {
+        synchronized (this) {
             openStream(exchange);
             writeToStream(outputStream, exchange);
             closeStream(false);

Modified: camel/branches/camel-2.9.x/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamSystemOutTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamSystemOutTest.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamSystemOutTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamSystemOutTest.java
Wed Oct 10 21:49:44 2012
@@ -35,7 +35,7 @@ public class StreamSystemOutTest extends
     ByteArrayOutputStream mockOut = new ByteArrayOutputStream();
 
     // START SNIPPET: e1
-     @Test
+    @Test
     public void testStringContent() throws Exception {
         try {
             // Given

Modified: camel/branches/camel-2.9.x/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java?rev=1396815&r1=1396814&r2=1396815&view=diff
==============================================================================
--- camel/branches/camel-2.9.x/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java
(original)
+++ camel/branches/camel-2.9.x/components/camel-zookeeper/src/test/java/org/apache/camel/component/zookeeper/operations/CreateOperationTest.java
Wed Oct 10 21:49:44 2012
@@ -39,7 +39,7 @@ public class CreateOperationTest extends
 
     @Test
     public void createBasic() throws Exception {
-         CreateOperation create = new CreateOperation(connection, "/one");
+        CreateOperation create = new CreateOperation(connection, "/one");
 
         OperationResult<String> result = create.get();
         assertEquals("/one", result.getResult());



Mime
View raw message