Closed VictorKrapivin closed 5 years ago
Thanks for reporting. Would you do the fix ?
@cbornet
Would you do the fix ?
Hi, sure. But I'm not able to create branch in this repository. Actually my suggestion is to fix it like that:
@UnwrapByDefault
public class JsonNullableValueExtractor implements ValueExtractor<JsonNullable<@ExtractedValue ?>> {
@Override
public void extractValues(JsonNullable<?> originalValue, ValueReceiver receiver) {
if (originalValue.isPresent()) {
receiver.value(null, originalValue.get());
}
}
}
@VictorKrapivin to submit a PR, you need to fork the repo, create a branch in the fork, then you can PR with the help of GitHub. See details here.
@cbornet Ok, thanks for explanation! PR #13 ready for review
Closed by #13
@cbornet Any plans for release?
@cbornet Hi! Is it possible to release this fix in 0.2.1?
@VictorKrapivin, @cbornet:
If I remember well, I have published the last release to maven central.
I am waiting for feedback, just to be sure.
The idea is to create a 0.2.1
release and bump master to 0.2.2-SNAPSHOT
?
@jmini Thanks!!
At the moment value initialized as undefined() is treated as null within validation.
Following code demonstrates issue:
Here violations should be empty, because JSR380 constraints address value within JsonNullable container, not container itself. So testObject is valid. But actual behavior gives violations.