Remove TYPE from targets of @ConvertGroup for consistency with @Valid

Description

Section 4.4.5. Group conversion of the spec is described as follows.

@ConvertGroup and @ConvertGroup.List can be used everywhere @Valid can be used (associations, method/constructor parameters and return value). If these annotations are used without @Valid, a ConstraintDeclarationException is raised.

But @ConvertGroup and @ConvertGroup.List target TYPE which @Valid does not.
So, remove TYPE from targets of @ConvertGroup.

Environment

None

Activity

Show:
Akira Kawauchi
February 19, 2017, 8:24 AM
Gunnar Morling
February 20, 2017, 12:21 PM

That's a good find. I'll need to clarify though whether we can remove the wrong element type in terms of backwards compatibility (no one should ever have put @ConvertGroup to the type-level, but technically it would have been possible, so it may pose a (albeit quite theoretical) compatibility issue).

Akira Kawauchi
February 21, 2017, 9:37 AM

Thanks. I see why we cannot remove it.
Should I withdraw the current pull request?
May I leave this issue still open for adding a docmenttation comment?

Gunnar Morling
June 28, 2017, 8:29 AM

As it turns out, TYPE_USE (which we've added to support group conversions on container element cascades) also allows the usage of the annotation on type definitions (see class-comment on ElementType), so the point about backwards compatibility is moot.

Assignee

Gunnar Morling

Reporter

Akira Kawauchi

Labels

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

Yes, likely

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Trivial
Configure