camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject git commit: Fix checkstyle/formatting issues
Date Tue, 19 Aug 2014 16:38:48 GMT
Repository: camel
Updated Branches:
  refs/heads/master 9bd85b6ab -> c4f5f8ce7


Fix checkstyle/formatting issues


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c4f5f8ce
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c4f5f8ce
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c4f5f8ce

Branch: refs/heads/master
Commit: c4f5f8ce7282f6c0dbfdf90ea4e17129d6222170
Parents: 9bd85b6
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Aug 19 12:38:21 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Aug 19 12:38:21 2014 -0400

----------------------------------------------------------------------
 .../camel/component/sjms/SjmsConsumer.java      |   2 +-
 .../camel/component/sjms/SjmsProducer.java      |   2 +-
 .../sjms/threadpool/ThreadPoolTest.java         | 128 +++++++++----------
 3 files changed, 66 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c4f5f8ce/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
index 4ae566d..017acbe 100644
--- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
+++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsConsumer.java
@@ -157,7 +157,7 @@ public class SjmsConsumer extends DefaultConsumer {
             consumers.drainPool();
             consumers = null;
         }
-        if(this.executor!=null){
+        if (this.executor != null) {
             getEndpoint().getCamelContext().getExecutorServiceManager().shutdownGraceful(this.executor);
         }
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/c4f5f8ce/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
index 582d657..8e9e878 100644
--- a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
+++ b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsProducer.java
@@ -146,7 +146,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer {
             getProducers().drainPool();
             setProducers(null);
         }
-        if(this.executor!=null){
+        if (this.executor != null) {
             getEndpoint().getCamelContext().getExecutorServiceManager().shutdownGraceful(this.executor);
         }
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/c4f5f8ce/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
----------------------------------------------------------------------
diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
index 1bff29e..cec28c4 100644
--- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
+++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/threadpool/ThreadPoolTest.java
@@ -36,77 +36,77 @@ import org.slf4j.LoggerFactory;
  */
 public class ThreadPoolTest extends JmsTestSupport {
 
-	private static final Logger LOGGER = LoggerFactory.getLogger(ThreadPoolTest.class);
-	private static final String FROM_ROUTE = "from";
-	private static final String TO_ROUTE = "to";
+    private static final Logger LOGGER = LoggerFactory.getLogger(ThreadPoolTest.class);
+    private static final String FROM_ROUTE = "from";
+    private static final String TO_ROUTE = "to";
 
-	@Override
-	protected boolean useJmx() {
-		return true;
-	}
+    @Override
+    protected boolean useJmx() {
+        return true;
+    }
 
-	@Override
-	protected RouteBuilder createRouteBuilder() throws Exception {
-		return new RouteBuilder() {
-			@Override
-			public void configure() throws Exception {
-				from("direct:start").to("sjms:queue:foo").routeId(FROM_ROUTE);
-				from("sjms:queue:foo").to("log:test.log.1?showBody=true").routeId(TO_ROUTE);
-			}
-		};
-	}
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start").to("sjms:queue:foo").routeId(FROM_ROUTE);
+                from("sjms:queue:foo").to("log:test.log.1?showBody=true").routeId(TO_ROUTE);
+            }
+        };
+    }
 
-	/**
-	 * Test that only 2 thread pools are created on start
-	 * 
-	 * @throws Exception
-	 */
-	@Test
-	public void testContextStart() throws Exception {
-		assertProducerThreadPoolCount(1);
-		assertConsumerThreadPoolCount(1);
-	}
+    /**
+     * Test that only 2 thread pools are created on start
+     * 
+     * @throws Exception
+     */
+    @Test
+    public void testContextStart() throws Exception {
+        assertProducerThreadPoolCount(1);
+        assertConsumerThreadPoolCount(1);
+    }
 
-	/**
-	 * Test that ThreadPool is removed when producer is removed
-	 * @throws Exception
-	 */
-	@Test
-	public void testProducerThreadThreadPoolRemoved() throws Exception {
-		context.stopRoute(FROM_ROUTE);
-		assertProducerThreadPoolCount(0);
-	}
+    /**
+     * Test that ThreadPool is removed when producer is removed
+     * @throws Exception
+     */
+    @Test
+    public void testProducerThreadThreadPoolRemoved() throws Exception {
+        context.stopRoute(FROM_ROUTE);
+        assertProducerThreadPoolCount(0);
+    }
 
-	/**
-	 * Test that ThreadPool is removed when consumer is removed
-	 * @throws Exception
-	 */
-	@Test
-	public void testConsumerThreadThreadPoolRemoved() throws Exception {
-		context.stopRoute(TO_ROUTE);
-		assertConsumerThreadPoolCount(0);
-	}
+    /**
+     * Test that ThreadPool is removed when consumer is removed
+     * @throws Exception
+     */
+    @Test
+    public void testConsumerThreadThreadPoolRemoved() throws Exception {
+        context.stopRoute(TO_ROUTE);
+        assertConsumerThreadPoolCount(0);
+    }
 
-	private void assertProducerThreadPoolCount(final int count) throws Exception {
-		assertEquals(count, getMbeanCount("\"InOnlyProducer"));
-	}
+    private void assertProducerThreadPoolCount(final int count) throws Exception {
+        assertEquals(count, getMbeanCount("\"InOnlyProducer"));
+    }
 
-	private void assertConsumerThreadPoolCount(final int count) throws Exception {
-		assertEquals(count, getMbeanCount("\"SjmsConsumer"));
-	}
+    private void assertConsumerThreadPoolCount(final int count) throws Exception {
+        assertEquals(count, getMbeanCount("\"SjmsConsumer"));
+    }
 
-	private int getMbeanCount(final String name) throws MalformedObjectNameException {
-		MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
-		Set<ObjectInstance> mbeans = mbs.queryMBeans(new ObjectName("org.apache.camel:type=threadpools,*"),
null);
-		LOGGER.debug("mbeans size: " + mbeans.size());
-		int count = 0;
-		for (ObjectInstance mbean : mbeans) {
-			LOGGER.debug("mbean: {}", mbean);
-			if (mbean.getObjectName().getKeyProperty("name").startsWith(name)) {
-				count++;
-			}
-		}
-		return count;
-	}
+    private int getMbeanCount(final String name) throws MalformedObjectNameException {
+        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+        Set<ObjectInstance> mbeans = mbs.queryMBeans(new ObjectName("org.apache.camel:type=threadpools,*"),
null);
+        LOGGER.debug("mbeans size: " + mbeans.size());
+        int count = 0;
+        for (ObjectInstance mbean : mbeans) {
+            LOGGER.debug("mbean: {}", mbean);
+            if (mbean.getObjectName().getKeyProperty("name").startsWith(name)) {
+                count++;
+            }
+        }
+        return count;
+    }
 
 }


Mime
View raw message