[ 
https://issues.apache.org/jira/browse/CAMEL-24581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110336#comment-18110336
 ] 

Claus Ibsen commented on CAMEL-24581:
-------------------------------------

You can use mandatoryAs if null is not allowed as a returned value then you get 
an exception if a converter does not exists

> simple converter ignores UUID strings
> -------------------------------------
>
>                 Key: CAMEL-24581
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24581
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 4.x
>            Reporter: Ivan Ravin
>            Priority: Minor
>
> I dont know, this is bug or feature, but simple language cant convert uuid 
> string -> uuid. This code returns null (empty string in camel 2):
> {code:java}
> from("timer:test?repeatCount=1&delay=2000")
> .setHeader("UUID").constant(java.util.UUID.randomUUID().toString())
> .log(LoggingLevel.WARN, "${headerAs(UUID, java.util.UUID)}") // prints null
> .setBody().constant(java.util.UUID.randomUUID().toString())
> .log(LoggingLevel.WARN, "${bodyAs(java.util.UUID)}") // prints null
> ;{code}



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

Reply via email to