Claus Ibsen created CAMEL-24375:
-----------------------------------

             Summary: parseDuration should handle plain millis value without 
relying on type converter
                 Key: CAMEL-24375
                 URL: https://issues.apache.org/jira/browse/CAMEL-24375
             Project: Camel
          Issue Type: Bug
            Reporter: Claus Ibsen


CamelContextHelper.parseDuration delegates to the generic parse method which 
relies on the type converter registry to convert String to Duration. When the 
DurationConverter is not yet loaded (e.g. during early route initialization), 
parsing a plain millisecond value like "20000" fails with 
NoTypeConversionAvailableException.

The fix is to make parseDuration handle the conversion directly using 
TimeUtils.toMilliSeconds (same logic as DurationConverter) so it does not 
depend on the type converter registry being fully initialized.

This affects components like camel-resilience4j where circuit breaker 
configuration values (e.g. waitDurationInOpenState=20000) are parsed as 
Duration during route creation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to