camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Moulliard (JIRA)" <>
Subject [jira] [Created] (CAMEL-7742) Support grouping separtor for Camel Bindy (BigDecimal)
Date Mon, 25 Aug 2014 06:16:58 GMT
Charles Moulliard created CAMEL-7742:

             Summary: Support grouping separtor for Camel Bindy (BigDecimal)
                 Key: CAMEL-7742
             Project: Camel
          Issue Type: Improvement
          Components: camel-bindy
    Affects Versions: 2.13.2
            Reporter: Charles Moulliard


I currently have a problem concerning Camel Bindy. I have a csv file that
should be parsed with Camel Bindy using a given model class. This csv file
contains a number that should be parsed as a BigDecimal. The problem is that
this number contains a comma as a grouping separator and a point as the
decimal separator.
If I start the camel route the unmarshal process will throw a
NumberFormatException mentioning the invalid format of that number. So I
tried to add a pattern to the DataField annotation, but the error stays.

After digging throw the documentation (
and the source code of FormatFactory
I'm a little bit confused, because the documentation mentions the ability to
specify a grouping separator, but the source code shows that the pattern is
ignored for BigDecimal data types.

Does anyone know how to specify that grouping separator? Or is this not
implemented yet?


    public void parsePattern(String formattedString,
                      Locale locale,
                      String pattern,
                      char groupingSeparator,
                      char decimalSeparator) throws ParseException {

        DecimalFormatSymbols symbols = new DecimalFormatSymbols(locale);
        DecimalFormat decimalFormat = new DecimalFormat(pattern, symbols);

        // parse the string
        BigDecimal bigDecimal = (BigDecimal) decimalFormat.parse(formattedString);

This message was sent by Atlassian JIRA

View raw message