You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Zoran Regvart (Jira)" <ji...@apache.org> on 2020/02/28 10:31:00 UTC
[jira] [Commented] (CAMEL-14575) camel-core - TypeConverter from
String to Long - drop time pattern
[ https://issues.apache.org/jira/browse/CAMEL-14575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17047436#comment-17047436 ]
Zoran Regvart commented on CAMEL-14575:
---------------------------------------
Perhaps we could offer ISO-8601 duration format PnDTnHnMn.nS and parse via the [Duration.parse|https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse-java.lang.CharSequence-] for those not inclined to use milliseconds instead?
> camel-core - TypeConverter from String to Long - drop time pattern
> ------------------------------------------------------------------
>
> Key: CAMEL-14575
> URL: https://issues.apache.org/jira/browse/CAMEL-14575
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 3.2.0
>
>
> We should look at dropping the support for time pattern in long values which are used for milli seconds, eg
> 1000 = 1s
> 30000 = 30s
> 60000 = 1h
> The shothand requires a regexp parser for those syntax patterns. And if we drop this then the type converter for String -> Long just becomes plain simple and therefore faster.
> An alternative is to have some kind of marker on @UriParam that indicate this option is a long value but it accepts the time pattern too, and then have generated type converter configurer to handle this specially.
> This requires to markup those from all the components, eg timer, scheduler and so on.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)