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

@fsoylemez fsoylemez commented Apr 4, 2017

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

@bartoszwalacik bartoszwalacik commented Apr 5, 2017

That's the way String.equals() works

@fsoylemez
Copy link
Author

@fsoylemez fsoylemez commented Apr 5, 2017

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

@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Apr 5, 2017

Maybe as an option

@bartoszwalacik
Copy link
Member

@bartoszwalacik bartoszwalacik commented Jun 22, 2017

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants