Skip to content

AnnotationTypeMapping mirror sets do not resolve in openfeign #22969

Closed
@philwebb

Description

@philwebb

Spring Cloud openfeign project is currently failing due to the following exception:

Caused by: org.springframework.core.annotation.AnnotationConfigurationException: Different @AliasFor mirror values for annotation [org.springframework.cloud.openfeign.FeignClient] declared on org.springframework.cloud.openfeign.invalid.FeignClientValidationTests$NameAndValueConfiguration$Client, attribute 'name' and its alias 'value' are declared with values of [bar] and [foo].
    at org.springframework.core.annotation.AnnotationTypeMapping$MirrorSets$MirrorSet.resolve(AnnotationTypeMapping.java:649)
    at org.springframework.core.annotation.AnnotationTypeMapping$MirrorSets.resolve(AnnotationTypeMapping.java:604)
    at org.springframework.core.annotation.TypeMappedAnnotation.<init>(TypeMappedAnnotation.java:137)
    at org.springframework.core.annotation.TypeMappedAnnotation.<init>(TypeMappedAnnotation.java:120)
    at org.springframework.core.annotation.TypeMappedAnnotation.of(TypeMappedAnnotation.java:633)
    at org.springframework.core.annotation.MergedAnnotation.of(MergedAnnotation.java:584)
    at org.springframework.core.type.classreading.MergedAnnotationReadingVisitor.visitEnd(MergedAnnotationReadingVisitor.java:96)
    at org.springframework.asm.ClassReader.readElementValues(ClassReader.java:2775)
    at org.springframework.asm.ClassReader.accept(ClassReader.java:572)
    at org.springframework.asm.ClassReader.accept(ClassReader.java:400)
    at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:50)
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103)
    at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:123)
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.scanCandidateComponents(ClassPathScanningCandidateComponentProvider.java:430)
    ... 45 more

Initial analysis looks like 3b145a5 might be to blame, but we didn't get any framework or boot test failures so we must have a scenario that we've not properly covered.

Metadata

Metadata

Assignees

Labels

status: declinedA suggestion or change that we don't feel we should currently apply

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions