Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change monetary amounts to BigDecimal #151

Open
arkhadi opened this issue Mar 2, 2024 · 2 comments
Open

Change monetary amounts to BigDecimal #151

arkhadi opened this issue Mar 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@arkhadi
Copy link

arkhadi commented Mar 2, 2024

Prerequisites

Put an X between the brackets on this line if you have done all the following:

  • [X ] Reproduced the problem or exposed a new need
  • [X ] Checked the GitHub existing issues

Description

When working with monetary amounts in Java it is recommended to avoid the use of Long or Double as they may introduce rounding issues. BigDecimal is the recommended type for monetary amounts. Explanation can be found here

Steps to Reproduce

Expected behavior:

Amount values parsing to BigDecimal from Json.

Actual behavior:

Double being used.

Reproduces how often:

Every time as it is in all the classes.

Versions

Latest

@ianardee
Copy link
Collaborator

ianardee commented Mar 6, 2024

Yes, this is something we plan on doing but would be a major breaking change for all users.

There are also some breaking changes we want to do around error handling, we'll do both of these changes in a version 5.0.

@ianardee ianardee added the enhancement New feature or request label Mar 6, 2024
@arkhadi
Copy link
Author

arkhadi commented Mar 9, 2024

Glad to hear and thanks for the quick reply. I have already implemented the change for the types I'm using so I'm covered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants