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 2018/07/05 12:08:07 UTC

[camel] branch master updated (ce5eb87 -> 43e335d)

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

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


    from ce5eb87  Add missing javadoc to rest-dsl model
     new 0499107  CAMEL-12609: Filter Headers/Properties in DefaultExchangeFormatter
     new 43e335d  CAMEL-12609: Filter Headers/Properties in DefaultExchangeFormatter (removed blank Javadoc line)

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:
 .../apache/camel/processor/DefaultExchangeFormatter.java  | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)


[camel] 02/02: CAMEL-12609: Filter Headers/Properties in DefaultExchangeFormatter (removed blank Javadoc line)

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 43e335d567ba551fe5cebb6f57481139868fc430
Author: dariusx <da...@gmail.com>
AuthorDate: Thu Jul 5 06:58:39 2018 -0400

    CAMEL-12609: Filter Headers/Properties in DefaultExchangeFormatter (removed blank Javadoc line)
---
 .../main/java/org/apache/camel/processor/DefaultExchangeFormatter.java   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
index 184430823..b98395d 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
@@ -237,7 +237,6 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
 
     /**
      * Filters the headers or properties before formatting them. No default behavior, but can be overridden.
-     *
      * @param map
      * @return
      */


[camel] 01/02: CAMEL-12609: Filter Headers/Properties in DefaultExchangeFormatter

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 049910798dd0c012ac72555311d753bc3b42e45c
Author: dariusx <da...@gmail.com>
AuthorDate: Thu Jul 5 06:22:54 2018 -0400

    CAMEL-12609: Filter Headers/Properties in DefaultExchangeFormatter
---
 .../apache/camel/processor/DefaultExchangeFormatter.java | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
index 3f05e30..184430823 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/DefaultExchangeFormatter.java
@@ -111,13 +111,13 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
             if (multiline) {
                 sb.append(SEPARATOR);
             }
-            sb.append(style("Properties")).append(sortMap(exchange.getProperties()));
+            sb.append(style("Properties")).append(sortMap(filterHeaderAndProperties(exchange.getProperties())));
         }
         if (showAll || showHeaders) {
             if (multiline) {
                 sb.append(SEPARATOR);
             }
-            sb.append(style("Headers")).append(sortMap(in.getHeaders()));
+            sb.append(style("Headers")).append(sortMap(filterHeaderAndProperties(in.getHeaders())));
         }
         if (showAll || showBodyType) {
             if (multiline) {
@@ -173,7 +173,7 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
                     if (multiline) {
                         sb.append(SEPARATOR);
                     }
-                    sb.append(style("OutHeaders")).append(sortMap(out.getHeaders()));
+                    sb.append(style("OutHeaders")).append(sortMap(filterHeaderAndProperties(out.getHeaders())));
                 }
                 if (showAll || showBodyType) {
                     if (multiline) {
@@ -235,6 +235,16 @@ public class DefaultExchangeFormatter implements ExchangeFormatter {
         }
     }
 
+    /**
+     * Filters the headers or properties before formatting them. No default behavior, but can be overridden.
+     *
+     * @param map
+     * @return
+     */
+    protected Map<String, Object> filterHeaderAndProperties(Map<String, Object> map) {
+        return map;
+    }
+
     public boolean isShowExchangeId() {
         return showExchangeId;
     }