mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Exclude legacy @javax.validation.Constraint from attribute override check
Prior to this commit, we only excluded @jakarta.validation.Constraint from the convention-based annotation attribute override check. This commit additionally excludes the legacy @javax.validation.Constraint annotation from the convention-based annotation attribute override check. See gh-28760 See gh-28761 Closes gh-36412
This commit is contained in:
+4
-2
@@ -53,8 +53,10 @@ final class AnnotationTypeMapping {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(AnnotationTypeMapping.class);
|
||||
|
||||
private static final Predicate<? super Annotation> isBeanValidationConstraint = annotation ->
|
||||
annotation.annotationType().getName().equals("jakarta.validation.Constraint");
|
||||
private static final Predicate<? super Annotation> isBeanValidationConstraint = annotation -> {
|
||||
String name = annotation.annotationType().getName();
|
||||
return (name.equals("jakarta.validation.Constraint") || name.equals("javax.validation.Constraint"));
|
||||
};
|
||||
|
||||
/**
|
||||
* Set used to track which convention-based annotation attribute overrides
|
||||
|
||||
Reference in New Issue
Block a user