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

Large Commit ID is persisted with different value than logged #855

Closed
andreiamariei opened this issue Jun 28, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@andreiamariei
Copy link
Contributor

commented Jun 28, 2019

When using RANDOM CommitIdGenerator, Javers logs different Commit IDs than what's being actually persisted in the database.

The issue seems to be the conversion to double in CommitId.valueAsNumber().

Test (quickly written in spock):

def "large commit id test"() {
    expect:
        new CommitId(8804939115786087745, 0).valueAsNumber() == 8804939115786087745.00
}

results in:

Condition not satisfied:

new CommitId(8804939115786087745, 0).valueAsNumber() == 8804939115786087745.00
|                                    |               |
8804939115786087745.0                |               false
                                     8804939115786087424.00

@bartoszwalacik

This comment has been minimized.

Copy link
Member

commented Jun 28, 2019

Hi , we will be happy to accept your pull request with the fix

andreiamariei added a commit to andreiamariei/javers that referenced this issue Jun 29, 2019

bartoszwalacik added a commit that referenced this issue Jul 1, 2019

https://github.com//issues/855
RoundingMode fix
@bartoszwalacik

This comment has been minimized.

Copy link
Member

commented Jul 1, 2019

fixed in 5.6.1

andreiamariei added a commit to andreiamariei/javers that referenced this issue Jul 4, 2019

andreiamariei added a commit to andreiamariei/javers that referenced this issue Jul 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.