Repository: camel Updated Branches: refs/heads/master 11b328236 -> c88548c22
CAMEL-7723 Fixed the CS errors of camel-sjms Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c88548c2 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c88548c2 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c88548c2 Branch: refs/heads/master Commit: c88548c220f34fb18d893213ae9a1ebb4f38445d Parents: 11b3282 Author: Willem Jiang <willem.ji...@gmail.com> Authored: Wed Aug 20 15:01:11 2014 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Wed Aug 20 15:01:11 2014 +0800 ---------------------------------------------------------------------- .../java/org/apache/camel/component/sjms/SjmsConsumer.java | 6 +++--- .../java/org/apache/camel/component/sjms/SjmsProducer.java | 4 ++-- .../camel/component/sjms/AsyncStartStopListenerTest.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/c88548c2/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 3c4b82f..c6070d6 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 @@ -147,12 +147,12 @@ public class SjmsConsumer extends DefaultConsumer { super.doStart(); this.executor = getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "SjmsConsumer"); consumers = new MessageConsumerPool(); - if(getEndpoint().isAsyncStartListener()){ + if (getEndpoint().isAsyncStartListener()) { getEndpoint().getComponent().getAsyncStartStopExecutorService().submit(new Runnable() { @Override public void run() { try { - consumers.fillPool(); + consumers.fillPool(); } catch (Throwable e) { log.warn("Error starting listener container on destination: " + getDestinationName() + ". This exception will be ignored.", e); } @@ -172,7 +172,7 @@ public class SjmsConsumer extends DefaultConsumer { protected void doStop() throws Exception { super.doStop(); if (consumers != null) { - if(getEndpoint().isAsyncStopListener()){ + if (getEndpoint().isAsyncStopListener()) { getEndpoint().getComponent().getAsyncStartStopExecutorService().submit(new Runnable() { @Override public void run() { http://git-wip-us.apache.org/repos/asf/camel/blob/c88548c2/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 64a5914..1a31818 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 @@ -135,7 +135,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { this.executor = getEndpoint().getCamelContext().getExecutorServiceManager().newDefaultThreadPool(this, "SjmsProducer"); if (getProducers() == null) { setProducers(new MessageProducerPool()); - if(getEndpoint().isAsyncStartListener()){ + if (getEndpoint().isAsyncStartListener()) { getEndpoint().getComponent().getAsyncStartStopExecutorService().submit(new Runnable() { @Override public void run() { @@ -161,7 +161,7 @@ public abstract class SjmsProducer extends DefaultAsyncProducer { protected void doStop() throws Exception { super.doStop(); if (getProducers() != null) { - if(getEndpoint().isAsyncStopListener()){ + if (getEndpoint().isAsyncStopListener()) { getEndpoint().getComponent().getAsyncStartStopExecutorService().submit(new Runnable() { @Override public void run() { http://git-wip-us.apache.org/repos/asf/camel/blob/c88548c2/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/AsyncStartStopListenerTest.java ---------------------------------------------------------------------- diff --git a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/AsyncStartStopListenerTest.java b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/AsyncStartStopListenerTest.java index b10698f..49a16ed 100644 --- a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/AsyncStartStopListenerTest.java +++ b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/AsyncStartStopListenerTest.java @@ -33,7 +33,7 @@ public class AsyncStartStopListenerTest extends JmsTestSupport { @Test public void testAsyncStartStopConsumer() throws Exception { - sendBodyAndAssert("sjms:queue:foo.startstop"); + sendBodyAndAssert("sjms:queue:foo.startstop"); } @Test @@ -54,7 +54,7 @@ public class AsyncStartStopListenerTest extends JmsTestSupport { @Test public void testAsyncStartStopProducer() throws Exception { sendBodyAndAssert("sjms:queue:foo?asyncStopListener=true&asyncStartListener=true"); - } + } private void sendBodyAndAssert(final String uri) throws InterruptedException { String body1 = "Hello World";