Skip to content

AnnotatedElementUtils.findMergedAnnotation not working for javax annotations (e.g. NotNull) #22957

@bakslashr

Description

@bakslashr

Affects: 5.1.x


Meta-annotations not being scanned for any package that begins with the "java" string, which includes the javax package.

The utility the method AnnotationUtils.hasPlainJavaAnnotationsOnly is checking if the class name starts with "java" instead of "java."

Previously using AnnotatedElementUtils.findMergedAnnotation we could have an element annotated with javax.validation.constraints.NotNull search for the meta-annotation javax.validation.Constraint However, this stopped working with 5.1.x because it relies on the utility method.

Excluding all packages which begin with the string "java" and not targeting known and specific packages is a big assumption.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions