added default to from in ConvertGroup to Default#56
added default to from in ConvertGroup to Default#56lpandzic wants to merge 2 commits intojakartaee:masterfrom lpandzic:bval-493-convertgroup-default
Conversation
|
Hi, |
|
Can one of the admins add this person to the trusted builders? (reply with: "add to whitelist" or "ok to test") |
|
Added Default to 'to'. |
|
@lpandzic Cool 👍 |
|
Are there any blockers to merging this PR? |
|
I am actually concerned and borderline -1 yo having defaults to both. In particular the double default means I can write @ConvertGroup with no computer complaint. |
|
Btw, to merge the PR, we also need the corresponding PR for the spec and tck update for that change |
|
mmh, I think converting from or to Default.class could make sense, right? |
|
Well that's a noop which does not make much functional sense. Hence my reluctance. If we have to fix a problem with JavaDoc where the type system could help, I'm reluctant to go there. |
|
Ok, so should I revert back only to 'to' default? For spec -> jakartaee/validation-spec#93 I'm not sure what to change on tck. |
|
Yes I would revert back to just |
|
I'm negative on having default values for both, I can see how having the default value for Re-reading the discussion on BVAL-493, I'm wondering whether the entire issue isn't an attempt of re-using I think the confusion comes from the fact that Spring kind of mis-uses |
|
@gunnarmorling But maybe both |
|
Here is an example: Service X create(@NotNull @Valid @ConvertGroup(from = Default.class, to = Create.class)) X x);
X update(@NotNull @Valid @ConvertGroup(from = Default.class, to = Update.class)) X x)Model class X {
@Null(groups = {Create.class})
@NotNull(groups = {Update.class})
private final Long id;
...
}What I'd like to be able to do is: X create(@NotNull @Valid @ConvertGroup(to = Create.class)) X x);
X update(@NotNull @Valid @ConvertGroup(to = Update.class)) X x) |
I'm also fine with that, maybe we should continue this discussion on the issue itself? |
|
Hi, I admit to feel guilty about forgetting about this one for such a long time. We are very close to the Final release, and it seems too late to explore an expansion of |
|
I'm going to close this in favor of #129 which makes |
As per comments in BVAL-493, I've added default to ConvertGroup - Default.
For use cases where group conversion is done from Default this change will simplify code:
@ConvertGroup(from = Default.class, to = SecondLevelCheck.class)can be changed to
@ConvertGroup(to = SecondLevelCheck.class).