You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/03/08 15:50:52 UTC
[camel] branch master updated: CAMEL-16279: camel-core - Optimize
core to reduce object allocations by pooloing reusable tasks in the routing
engine.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new f7a2d1b CAMEL-16279: camel-core - Optimize core to reduce object allocations by pooloing reusable tasks in the routing engine.
f7a2d1b is described below
commit f7a2d1b26d339f58e125281837028020e3c9e119
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Mon Mar 8 16:50:21 2021 +0100
CAMEL-16279: camel-core - Optimize core to reduce object allocations by pooloing reusable tasks in the routing engine.
---
.../main/java/org/apache/camel/impl/engine/PooledExchangeFactory.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/PooledExchangeFactory.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/PooledExchangeFactory.java
index bd40516..d1effc9 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/PooledExchangeFactory.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/PooledExchangeFactory.java
@@ -164,7 +164,9 @@ public final class PooledExchangeFactory extends PrototypeExchangeFactory {
@Override
public void purge() {
- pool.clear();
+ if (pool != null) {
+ pool.clear();
+ }
}
@Override