You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/05/17 19:39:00 UTC

[jira] [Resolved] (CAMEL-18119) Regression in 3.4 in date formatting of Simple expression

     [ https://issues.apache.org/jira/browse/CAMEL-18119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-18119.
---------------------------------
    Fix Version/s: 3.14.4
                   3.18.0
       Resolution: Fixed

> Regression in 3.4 in date formatting of Simple expression
> ---------------------------------------------------------
>
>                 Key: CAMEL-18119
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18119
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.4.0
>            Reporter: Antoine DESSAIGNE
>            Priority: Minor
>             Fix For: 3.14.4, 3.18.0
>
>
> Hello,
> We use Joda time and we have custom Joda<>Java converters. For instance, you can convert Joda's {{ReadableInstant}} into Java's {{Date}}.
> Since [this commit|https://github.com/apache/camel/commit/46f4c43315219dba429c0612bbff5b05ef2ec0ac] from CAMEL-15114, Simple expressions can no longer convert header object to a {{Date}} object, they can only handle {{Date}} and {{Long}} types.
> I can provide a pull request but I see 2 ways of solving it and I don't know which one you prefer:
> # revert to {{exchange.getIn().getHeader(key, Date.class)}} because there's a {{DateTimeConverter.toDate(Long value)}} converter if you have a {{Long}}
> # keep the check on {{Date}} and {{Long}} types and then try to convert to {{Date}} and then fail if it cannot be converted
> Thank you



--
This message was sent by Atlassian Jira
(v8.20.7#820007)