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 2024/03/22 05:17:47 UTC
(camel) branch main updated: CAMEL-20590: avoiding delay to execute timeout to Camel RabbitMQ (InOut) (#13556)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new f04b28c60d4 CAMEL-20590: avoiding delay to execute timeout to Camel RabbitMQ (InOut) (#13556)
f04b28c60d4 is described below
commit f04b28c60d4f69f40fd36228dcc4e5bc45673ec4
Author: Rhuan Rocha <rh...@gmail.com>
AuthorDate: Fri Mar 22 02:16:26 2024 -0300
CAMEL-20590: avoiding delay to execute timeout to Camel RabbitMQ (InOut) (#13556)
* CAMEL-20590: avoiding delay to execute timeout to Camel RabbitMQ (InOut)
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
* CAMEL-20590: avoiding delay to execute timeout to Camel RabbitMQ (InOut)
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
* CAMEL-20590: avoiding delay to execute timeout to Camel RabbitMQ (InOut)
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
* CAMEL-20590: avoiding delay to execute timeout to Camel RabbitMQ (InOut)
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
---------
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
---
.../src/main/java/org/apache/camel/support/DefaultTimeoutMap.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java b/core/camel-support/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java
index 9534a45a492..5be87e40ef0 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java
@@ -83,6 +83,10 @@ public class DefaultTimeoutMap<K, V> extends ServiceSupport implements TimeoutMa
@Override
public V get(K key) {
TimeoutMapEntry<K, V> entry;
+ // if no contains, the lock is not necessary
+ if (!map.containsKey(key)) {
+ return null;
+ }
lock.lock();
try {
entry = map.get(key);