-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Overview
The AnnotationTypeMapping class attempts to exclude Bean Validation constraint annotations from attribute override validation logic to avoid unnecessary @AliasFor warnings on standard attributes like message, groups, and payload. However, the current implementation is strictly hard coded to jakarta.validation.Constraint.
annotation.annotationType().getName().equals("jakarta.validation.Constraint"
This check fails for custom constraints meta-annotated with the legacy javax.validation.Constraint (JSR-303/JSR-380).
Proposed Enhancement
Instead of an exact match, the framework should be namespace-agnostic regarding Bean Validation. I suggest:
- Using
endsWith(".validation.Constraint")to support both namespaces. - Or providing a fallback for the javax package to maintain backward compatibility for libraries that haven't fully migrated.
Related Issues
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement