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 2025/07/04 10:00:30 UTC
(camel) branch main updated: CAMEL-22217: Fix potential ClassCastException in BrowseDevConsole (#18537)
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 58baf8d3c15 CAMEL-22217: Fix potential ClassCastException in BrowseDevConsole (#18537)
58baf8d3c15 is described below
commit 58baf8d3c155dba48f1ab1780100a643b09e9a8a
Author: James Netherton <ja...@users.noreply.github.com>
AuthorDate: Fri Jul 4 11:00:23 2025 +0100
CAMEL-22217: Fix potential ClassCastException in BrowseDevConsole (#18537)
---
.../src/main/java/org/apache/camel/impl/console/BrowseDevConsole.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/camel-console/src/main/java/org/apache/camel/impl/console/BrowseDevConsole.java b/core/camel-console/src/main/java/org/apache/camel/impl/console/BrowseDevConsole.java
index b7e089eca63..5611085f500 100644
--- a/core/camel-console/src/main/java/org/apache/camel/impl/console/BrowseDevConsole.java
+++ b/core/camel-console/src/main/java/org/apache/camel/impl/console/BrowseDevConsole.java
@@ -185,12 +185,12 @@ public class BrowseDevConsole extends AbstractDevConsole {
jo.put("limit", max);
jo.put("position", begin);
if (!list.isEmpty()) {
- long ts = list.get(0).getMessage().getHeader(Exchange.MESSAGE_TIMESTAMP, 0, long.class);
+ long ts = list.get(0).getMessage().getHeader(Exchange.MESSAGE_TIMESTAMP, 0L, long.class);
if (ts > 0) {
jo.put("firstTimestamp", ts);
}
if (list.size() > 1) {
- ts = list.get(list.size() - 1).getMessage().getHeader(Exchange.MESSAGE_TIMESTAMP, 0,
+ ts = list.get(list.size() - 1).getMessage().getHeader(Exchange.MESSAGE_TIMESTAMP, 0L,
long.class);
if (ts > 0) {
jo.put("lastTimestamp", ts);