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 2023/12/11 08:52:48 UTC
(camel) branch camel-3.21.x updated: CAMEL-19734: fixing the elapsed time to message history (#12388)
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-3.21.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.21.x by this push:
new 02eb9f3a04d CAMEL-19734: fixing the elapsed time to message history (#12388)
02eb9f3a04d is described below
commit 02eb9f3a04d85f1f76a3dd309b917135e5c747ac
Author: Rhuan Rocha <rh...@gmail.com>
AuthorDate: Mon Dec 11 05:51:46 2023 -0300
CAMEL-19734: fixing the elapsed time to message history (#12388)
* CAMEL-19734: fixing the elapsed time to message history
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
* CAMEL-19734: fixing the elapsed time to message history
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
---------
Signed-off-by: Rhuan Rocha <rh...@gmail.com>
---
.../src/main/java/org/apache/camel/support/MessageHelper.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java b/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java
index fc119be3437..27a7f602ea9 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java
@@ -38,7 +38,6 @@ import org.apache.camel.spi.DataTypeAware;
import org.apache.camel.spi.ExchangeFormatter;
import org.apache.camel.spi.HeaderFilterStrategy;
import org.apache.camel.util.ObjectHelper;
-import org.apache.camel.util.StopWatch;
import org.apache.camel.util.StringHelper;
import org.apache.camel.util.URISupport;
import org.apache.camel.util.json.JsonArray;
@@ -658,7 +657,7 @@ public final class MessageHelper {
label = "from[" + URISupport.sanitizeUri(StringHelper.limitLength(exchange.getFromEndpoint().getEndpointUri(), 100))
+ "]";
}
- long elapsed = new StopWatch(exchange.getCreated()).taken();
+ long elapsed = System.currentTimeMillis() - exchange.getCreated();
List<MessageHistory> list = exchange.getProperty(ExchangePropertyKey.MESSAGE_HISTORY, List.class);
boolean enabled = list != null;