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 f2029990553be4cece8e2b71d9639c79431c6c30
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Sun Feb 14 09:38:35 2021 +0100

    CAMEL-16202: Polished
---
 .../org/apache/camel/spi/HeaderFilterStrategy.java  |  4 ++--
 .../camel/support/DefaultHeaderFilterStrategy.java  | 21 +++++++++++++--------
 2 files changed, 15 insertions(+), 10 deletions(-)

diff --git 
a/core/camel-api/src/main/java/org/apache/camel/spi/HeaderFilterStrategy.java 
b/core/camel-api/src/main/java/org/apache/camel/spi/HeaderFilterStrategy.java
index a8cadae..9a2d651 100644
--- 
a/core/camel-api/src/main/java/org/apache/camel/spi/HeaderFilterStrategy.java
+++ 
b/core/camel-api/src/main/java/org/apache/camel/spi/HeaderFilterStrategy.java
@@ -41,7 +41,7 @@ public interface HeaderFilterStrategy {
      * @param  headerName  the header name
      * @param  headerValue the header value
      * @param  exchange    the context to perform filtering
-     * @return             <tt>true</tt> if this header should be filtered out.
+     * @return             <tt>true</tt> if this header should be filtered 
(skipped).
      */
     boolean applyFilterToCamelHeaders(String headerName, Object headerValue, 
Exchange exchange);
 
@@ -55,7 +55,7 @@ public interface HeaderFilterStrategy {
      * @param  headerName  the header name
      * @param  headerValue the header value
      * @param  exchange    the context to perform filtering
-     * @return             <tt>true</tt> if this header should be filtered out.
+     * @return             <tt>true</tt> if this header should be filtered 
(skipped).
      */
     boolean applyFilterToExternalHeaders(String headerName, Object 
headerValue, Exchange exchange);
 
diff --git 
a/core/camel-support/src/main/java/org/apache/camel/support/DefaultHeaderFilterStrategy.java
 
b/core/camel-support/src/main/java/org/apache/camel/support/DefaultHeaderFilterStrategy.java
index a26e603..eff21be 100644
--- 
a/core/camel-support/src/main/java/org/apache/camel/support/DefaultHeaderFilterStrategy.java
+++ 
b/core/camel-support/src/main/java/org/apache/camel/support/DefaultHeaderFilterStrategy.java
@@ -89,7 +89,7 @@ public class DefaultHeaderFilterStrategy implements 
HeaderFilterStrategy {
     /**
      * Gets the "out" direction filter regular expression {@link Pattern}. The 
"out" direction is referred to copying
      * headers from Camel message to an external message. If the pattern 
matches a header, the header will be filtered
-     * out.
+     * (skipped).
      *
      * @return regular expression filter pattern
      */
@@ -100,7 +100,7 @@ public class DefaultHeaderFilterStrategy implements 
HeaderFilterStrategy {
     /**
      * Sets the "out" direction filter regular expression {@link Pattern}. The 
"out" direction is referred to copying
      * headers from Camel message to an external message. If the pattern 
matches a header, the header will be filtered
-     * out.
+     * (skipped).
      *
      * @param value regular expression filter pattern
      */
@@ -115,7 +115,7 @@ public class DefaultHeaderFilterStrategy implements 
HeaderFilterStrategy {
     /**
      * Sets the "out" direction filter regular expression {@link Pattern}. The 
"out" direction is referred to copying
      * headers from Camel message to an external message. If the pattern 
matches a header, the header will be filtered
-     * out.
+     * (skipped).
      *
      * @param pattern regular expression filter pattern
      */
@@ -149,7 +149,7 @@ public class DefaultHeaderFilterStrategy implements 
HeaderFilterStrategy {
     /**
      * Gets the "in" direction filter regular expression {@link Pattern}. The 
"in" direction is referred to copying
      * headers from an external message to a Camel message. If the pattern 
matches a header, the header will be filtered
-     * out.
+     * (skipped).
      *
      * @return regular expression filter pattern
      */
@@ -160,7 +160,7 @@ public class DefaultHeaderFilterStrategy implements 
HeaderFilterStrategy {
     /**
      * Sets the "in" direction filter regular expression {@link Pattern}. The 
"in" direction is referred to copying
      * headers from an external message to a Camel message. If the pattern 
matches a header, the header will be filtered
-     * out.
+     * (skipped).
      *
      * @param value regular expression filter pattern
      */
@@ -175,7 +175,7 @@ public class DefaultHeaderFilterStrategy implements 
HeaderFilterStrategy {
     /**
      * Sets the "in" direction filter regular expression {@link Pattern}. The 
"in" direction is referred to copying
      * headers from an external message to a Camel message. If the pattern 
matches a header, the header will be filtered
-     * out.
+     * (skipped).
      *
      * @param pattern regular expression filter pattern
      */
@@ -223,6 +223,11 @@ public class DefaultHeaderFilterStrategy implements 
HeaderFilterStrategy {
         return allowNullValues;
     }
 
+    /**
+     * Whether to allow null values.
+     *
+     * By default a header is skipped if its value is null. Setting this to 
true will preserve the header.
+     */
     public void setAllowNullValues(boolean value) {
         allowNullValues = value;
     }
@@ -238,9 +243,9 @@ public class DefaultHeaderFilterStrategy implements 
HeaderFilterStrategy {
      * When set to true, a match will filter out the header. This is the 
default value for backwards compatibility.
      *
      * When set to false, the pattern or filter will indicate that the header 
must be kept; anything not matched will be
-     * filtered out.
+     * filtered (skipped).
      *
-     * @param filterOnMatch <tt>true</tt> if a match filters out the header.
+     * @param filterOnMatch <tt>true</tt> if a match filters (skips) the 
header.
      */
     public void setFilterOnMatch(boolean filterOnMatch) {
         this.filterOnMatch = filterOnMatch;

Reply via email to