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/03/30 10:02:10 UTC

[camel] branch main updated (e3719648b60 -> f3ff6bf044d)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from e3719648b60 camel-jbang - Trace to show read position of stream cache body
     new 4cf432be699 camel-jbang - Trace to show read position of stream cache body
     new f3ff6bf044d CAMEL-19223: camel-core - StreamCache to have position method

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../modules/ROOT/pages/camel-4-migration-guide.adoc    |  1 +
 .../jbang/core/commands/action/CamelTraceAction.java   | 18 +++---------------
 2 files changed, 4 insertions(+), 15 deletions(-)


[camel] 02/02: CAMEL-19223: camel-core - StreamCache to have position method

Posted by da...@apache.org.
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

commit f3ff6bf044d1f27162d1efb65a316b38627fad21
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 30 12:01:53 2023 +0200

    CAMEL-19223: camel-core - StreamCache to have position method
---
 docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc b/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
index 01ddc28648e..61b9d303e0b 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4-migration-guide.adoc
@@ -85,6 +85,7 @@ We have removed deprecated APIs such as the following:
 - Moved `org.apache.camel.support.IntrospectionSupport` to `camel-core-engine` for internal use only. End users should use `org.apache.camel.spi.BeanInspection` instead.
 - Removed `archetypeCatalogAsXml` method from `org.apache.camel.catalog.CamelCatalog`.
 - The `org.apache.camel.health.HealthCheck` method `isLiveness` is now default `false` instead of `true`.
+- Added `position` method to `org.apache.camel.StreamCache`.
 
 == EIP Changes
 


[camel] 01/02: camel-jbang - Trace to show read position of stream cache body

Posted by da...@apache.org.
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

commit 4cf432be699879393c4aebcdcf8890815ae690bc
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 30 12:00:57 2023 +0200

    camel-jbang - Trace to show read position of stream cache body
---
 .../jbang/core/commands/action/CamelTraceAction.java   | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelTraceAction.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelTraceAction.java
index e49429b20cd..ccd06bf705c 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelTraceAction.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelTraceAction.java
@@ -914,10 +914,6 @@ public class CamelTraceAction extends ActionBaseCommand {
             return value != null ? value.toString() : "null";
         }
 
-        String positionAsString() {
-            return position != null ? position.toString() : "null";
-        }
-
         String valueAsStringPretty() {
             if (value == null) {
                 return "null";
@@ -1033,13 +1029,13 @@ public class CamelTraceAction extends ActionBaseCommand {
             }
             s = "(" + s + ")";
             int l = valueLength();
-            long p = posLength();
+            long p = position != null ? position : -1;
             if (l != -1 & p != -1) {
-                s = s + " (position: " + p + " length: " + l + ")";
+                s = s + " (pos: " + p + " length: " + l + ")";
             } else if (l != -1) {
                 s = s + " (length: " + l + ")";
             } else if (p != -1) {
-                s = s + " (position: " + p + ")";
+                s = s + " (pos: " + p + ")";
             }
             if (loggingColor) {
                 s = Ansi.ansi().fgBrightDefault().a(Ansi.Attribute.INTENSITY_FAINT).a(s).reset().toString();
@@ -1081,14 +1077,6 @@ public class CamelTraceAction extends ActionBaseCommand {
             }
         }
 
-        long posLength() {
-            if (position == null) {
-                return -1;
-            } else {
-                return position;
-            }
-        }
-
     }
 
 }