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/08/09 12:37:58 UTC
[camel] branch main updated: camel-jbang - Trace output cut type so it does not get too wide and clutter table output
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 9648c07ca0e camel-jbang - Trace output cut type so it does not get too wide and clutter table output
9648c07ca0e is described below
commit 9648c07ca0ee2d238a2ced4bb81ac17a56101b03
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed Aug 9 14:37:33 2023 +0200
camel-jbang - Trace output cut type so it does not get too wide and clutter table output
---
.../camel/dsl/jbang/core/commands/action/MessageTableHelper.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/MessageTableHelper.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/MessageTableHelper.java
index 3effbfa643b..f8080cf796f 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/MessageTableHelper.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/MessageTableHelper.java
@@ -344,6 +344,13 @@ public class MessageTableHelper {
s = type.substring(25);
} else if (type.startsWith("org.apache.camel.converter.stream.")) {
s = type.substring(34);
+ } else if (type.length() > 34) {
+ // type must not be too long
+ int pos = type.lastIndexOf('.');
+ if (pos == -1) {
+ pos = type.length() - 34;
+ }
+ s = type.substring(pos + 1);
} else {
s = type;
}