Skip to content

AnnotationMetadataReadingVisitor.getMetaAnnotationTypes(String) may return null but it is not marked @Nullable [SPR-17046] #21584

@spring-projects-issues

Description

@spring-projects-issues

Andy Wilkinson opened SPR-17046 and commented

I've noticed that AnnotationMetadataReadingVisitor.getMetaAnnotationTypes(String) will return null rather than the documented empty Set in two scenarios:

  1. getMetaAnnotationTypes is called with the name of an annotation that is not present
  2. getMetaAnnotationTypes is called with the name of an annotation that is present but that is not on the classpath

I've attached a small sample that hopefully illustrates both. It tests with Framework 5.1 snapshots but I believe that 5.0 is also affected and perhaps 4.3.x too.


Affects: 5.0.7

Attachments:

Issue Links:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions