Hi folks,
I recently encountered the situation that we required a Long (unix
timestamp) to java.util.Date conversion. I was pretty sure that such a
converter will exist in core-camel, but it doesn't. Furthermore, I came
across some pieces of code in camel-core, where this conversion is done
"manually" and not via a type converter - e.g., FileOperations:328
Date date = exchange.getIn().getHeader(Exchange.FILE_LAST_MODIFIED,
Date.class);
if (date != null) {
last = date.getTime();
} else {
// fallback and try a long
last =
exchange.getIn().getHeader(Exchange.FILE_LAST_MODIFIED, Long.class);
}
Is there a special reason why no Long <-> Date converter exists in the
DateTimeConverter? If not, I would suggest to open a JIRA issue and
attach a patch there.
Best regards,
Marco