This issue can't be edited

Because it belongs to an archived project. Jira admins can restore projects from the archive.

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:

Gunnar Morling June 28, 2017 at 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.

Akira Kawauchi February 21, 2017 at 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 February 20, 2017 at 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).

Fixed

Assignee

Gunnar Morling

Reporter

Bug Testcase Reminder (view)

Bug reports should generally be accompanied by a test case!

Bug Testcase Reminder (edit)

Bug reports should generally be accompanied by a test case!

Participants

Akira Kawauchi
Gunnar Morling

Components

Fix versions

Priority

Created February 19, 2017 at 4:24 AM
Updated July 5, 2017 at 1:33 PM
Resolved June 28, 2017 at 8:29 AM