camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/4] camel git commit: CAMEL-8510: Fix potential NPE in pax event consumer.
Date Thu, 19 Mar 2015 06:29:44 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x f6240e691 -> 710b64ca8
  refs/heads/master ed8d6c30b -> 794242b92


CAMEL-8510: Fix potential NPE in pax event consumer.


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

Branch: refs/heads/camel-2.15.x
Commit: 710b64ca8b15755e264ca9e88c9d14324442f9f9
Parents: 024c6ad
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Mar 19 07:29:39 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Mar 19 07:31:11 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/component/paxlogging/PaxLoggingConsumer.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/710b64ca/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingConsumer.java
b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingConsumer.java
index 25702a7..7cebd17 100644
--- a/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingConsumer.java
+++ b/components/camel-paxlogging/src/main/java/org/apache/camel/component/paxlogging/PaxLoggingConsumer.java
@@ -89,10 +89,13 @@ public class PaxLoggingConsumer extends DefaultConsumer implements PaxAppender
{
     @Override
     protected void doStart() throws Exception {
         super.doStart();
+
+        // start the executor before the registration
+        executor = endpoint.getCamelContext().getExecutorServiceManager().newSingleThreadExecutor(this,
"PaxLoggingEventTask");
+
         Dictionary<String, String> props = new Hashtable<String, String>();
         props.put("org.ops4j.pax.logging.appender.name", endpoint.getAppender());
         registration = endpoint.getComponent().getBundleContext().registerService(PaxAppender.class.getName(),
this, props);
-        executor = endpoint.getCamelContext().getExecutorServiceManager().newSingleThreadExecutor(this,
"PaxLoggingEventTask");
     }
 
     @Override


Mime
View raw message