-
-
Notifications
You must be signed in to change notification settings - Fork 367
NullPointerException when commit property value is null #596
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
Comments
Thanks for reporting, would you like to contribute a PR with a fix? Looks easy to fix |
What is the right behavior? Allow null writes (and subsequent reads) or silently discard them? |
I suggest to silently remove all nulled properties before write to JaversRepository. Properties are stored in a map, nulled key is equiv to no key. |
A null key, yes I agree. But what about a null value? |
I mean, a key with null value is equiv to no key at all |
so we need to filter out all keys with null values |
#596 fixed null values problem in CommitPropertiesConverter
fix released in 3.7.7 |
It is possible to write a commit property whose value is
null
(in Java).But when Javers later tries to read/parse this (by calling
new JsonPrimitive()
on this line), an NPE is thrown becauseJsonPrimitive
doesn't handlenull
.The text was updated successfully, but these errors were encountered: