camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Repede (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-7926) header "CamelFileLastModified" returned as String in Processor
Date Fri, 17 Oct 2014 17:24:33 GMT
Alexandru Repede created CAMEL-7926:
---------------------------------------

             Summary: header "CamelFileLastModified" returned as String in Processor
                 Key: CAMEL-7926
                 URL: https://issues.apache.org/jira/browse/CAMEL-7926
             Project: Camel
          Issue Type: Bug
    Affects Versions: 2.8.6
            Reporter: Alexandru Repede
            Priority: Minor


Given a class that implements _Processor_

When trying to get _Exchange.FILE_LAST_MODIFIED_ as a java.util.Date, the result is null.
When calling
{noformat}
Date lastModification = exchange.getIn().getHeader(Exchange.FILE_LAST_MODIFIED, Date.class);
{noformat}
_lastModification_ is null.

Upon debugging, discovered that the header in question is a String. The call
{noformat}
exchange.getIn().getHeader(Exchange.FILE_LAST_MODIFIED)
{noformat}
returns a not null String value.


How is this possible when even _ExpressionBuilder.dateExpression_ does  
{noformat}
Date date;
date = exchange.getIn().getHeader(Exchange.FILE_LAST_MODIFIED, Date.class);
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message