camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Burgazzoli (JIRA)" <>
Subject [jira] [Commented] (CAMEL-5827) camel-bindy - Handle implied-decimal values
Date Mon, 03 Dec 2012 15:35:59 GMT


Luca Burgazzoli commented on CAMEL-5827:

New patch available, should fix all the the previous issues.

However I have a question related to how a float should be marshalled/un-marshalled: 

Let's take the class org.apache.camel.dataformat.bindy.model.complex.generateheader.Order
in which the field amount is defined as follow:

@DataField(pos = 9, precision = 2)
private BigDecimal amount;

This will properly un-marshall 10.00 and 10 but if I format it back I can only have 10 regardless
of the precison. Should we have to take into account the precision when formatting? Or to
add an additional parameter to properly represent the decimal part?


> camel-bindy - Handle implied-decimal values
> -------------------------------------------
>                 Key: CAMEL-5827
>                 URL:
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-bindy
>            Reporter: Luca Burgazzoli
>            Priority: Minor
>             Fix For: 2.11.0
>         Attachments: camel-bindy-implied.patch
> The communication with some legacy systems often relies on old protocols and formats
not easy to change and among that you may have to deal with fixed lenght records on which
decimal numbers are not represented with a decimal separator but the number of decimal places
is defined by the protocol definition (e.g. COBOL copy-book).
> Example:
> @DataField(pos = 1, length = 5, precision = 2, implied-decimal-separator = true)
> private BigDecimal amount;
> The string "12345" maps to 123.45 in Java. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message