Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0
-
None
-
Patch Available
Description
Most of the converters in IOConverter that do a char <-> byte conversion ignore the charset given as second argument to convertBodyTo. The attached patch fixes this.
- For relevant converter methods, it introduces an additional second Exchange parameter from which the desired charset is obtained.
- For backwards compatibility to code that uses the IOConverter directly, a one-parameter version of these methods was kept but the @Converter annotation was removed (Camel doesn't allow overloaded static type converter methods to be registered i.e. they overwrite in other in the registry).
- The patch furthermore removes existing redundancies in code like getting the charset from the exchange, check if the exchange is null etc.
- The String->byte[] converter from ObjectConverter was moved to IOConverter because its implementation is more closely related to other methods in this converter class.
Attachments
Attachments
There are no Sub-Tasks for this issue.