camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillermo <>
Subject How to set DataField locale for Double records in camel bindy
Date Wed, 08 May 2013 08:19:44 GMT

I have defined a CsvRecord with a DataField:

@DataField(pos = 1, required = true)
private Double price;

In the csv file this field has this format: XX,XX i.e. the decimal separator
is the ',' and the grouping separator is the '.'

If the VM is in ENGLISH locale/language, the records are not read correctly.

48,01 is read as 4801.0 in Java. 

I need to set the locale for this DataField. I know that exists a parameter
to format Decimal, Date, etc., but if I can't set the locale, I don't think
it's very helpful for me in this case.

Maybe the solution is to define the field as a String and then format it
using DecimalFormat class.

Any ideas?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message