header().contains() could have natural specialisation for String arguments
--------------------------------------------------------------------------

                 Key: CAMEL-401
                 URL: https://issues.apache.org/activemq/browse/CAMEL-401
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 1.2.0
            Reporter: Gary Tully



Filtering on a header that contains a string with a hyphen, the following works:

from(file://temp).filter(header(FileComponent.HEADER_FILE_NAME).matchesRegex(".*-.*")).to("mock:result");

but contains is more natural and should also work. 

from(file://temp).filter(header(FileComponent.HEADER_FILE_NAME).contains("-")).to("mock:result");

It does not as contains() is focused on collections and reduces to checking 
equality on single values. A string specialisation could use string.contains.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to