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

leading LF(\n) and CR (\r) characters produces a diff #531

Closed
fsoylemez opened this issue Apr 4, 2017 · 4 comments
Closed

leading LF(\n) and CR (\r) characters produces a diff #531

fsoylemez opened this issue Apr 4, 2017 · 4 comments
Labels

Comments

@fsoylemez
Copy link

Hello,
When i compute diff of two strings(map values),i see that leading empty characters produce a diff.
is it the way that it should work,or is this a bug?

@bartoszwalacik
Copy link
Member

That's the way String.equals() works

@fsoylemez
Copy link
Author

just saying,would it be wise to trim() before calling equals()?

@bartoszwalacik
Copy link
Member

Maybe as an option

@bartoszwalacik
Copy link
Member

fixed in release 3.3.0, see https://javers.org/release-notes/

for example:

 javersBuilder.registerValue(BigDecimal.class, (a,b) -> a.compareTo(b) == 0);

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

No branches or pull requests

2 participants