camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/4] camel git commit: CAMEL-8510: Fix potential NPE in pax event consumer.
Date Thu, 19 Mar 2015 06:29:47 GMT
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/794242b9
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/794242b9
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/794242b9

Branch: refs/heads/master
Commit: 794242b92d725d9afe3e67f1fd3fde061838a642
Parents: fa08380
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:36 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/794242b9/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