camel-commits mailing list archives

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

Branch: refs/heads/camel-2.14.x
Commit: 6aadc0d6e64e7825c1816edfecedece2e422be51
Parents: fa3b83c
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:30:39 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/6aadc0d6/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 51eb2dc..d5526f0 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.getName());
         registration = endpoint.getComponent().getBundleContext().registerService(PaxAppender.class.getName(),
this, props);
-        executor = endpoint.getCamelContext().getExecutorServiceManager().newSingleThreadExecutor(this,
"PaxLoggingEventTask");
     }
 
     @Override


Mime
View raw message