Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.8.3
-
None
-
Novice
Description
When converting Double or Float with value NaN, org.apache.camel.converter.ObjectConverter returns "null". But org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(Class, Exchange, Object) interpret this "null" as "suitable conversion not found" and cache misses. This lead to completely forgetting of conversion for given types.
For example, when conversing Double to Long, all works until Double is NaN. After that, conversion for "Double-to-Long" marked as misses. And camel stop do any conversion for Double-to-Long until restart.
Possible solution is to modify ObjectConverter`s methods to return "Void.TYPE" instead of "null" for NaN.