Polishing

See gh-31962
This commit is contained in:
Sam Brannen
2024-01-18 14:21:45 +01:00
parent 88a7ca0b0a
commit 6b905049eb
2 changed files with 6 additions and 8 deletions

View File

@@ -433,12 +433,11 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
private static class AnnotationDescriptor<A extends Annotation> {
private final A annotation;
private final Annotation source;
private final MergedAnnotation<?> root;
AnnotationDescriptor(MergedAnnotation<A> mergedAnnotation) {
this.annotation = mergedAnnotation.synthesize();
this.source = (mergedAnnotation.getDistance() > 0 ?
mergedAnnotation.getRoot().synthesize() : this.annotation);
this.root = mergedAnnotation.getRoot();
}
@Override
@@ -453,7 +452,7 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
@Override
public String toString() {
return this.source.toString();
return this.root.synthesize().toString();
}
}

View File

@@ -612,12 +612,11 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
private static class AnnotationDescriptor<A extends Annotation> {
private final A annotation;
private final Annotation source;
private final MergedAnnotation<?> root;
AnnotationDescriptor(MergedAnnotation<A> mergedAnnotation) {
this.annotation = mergedAnnotation.synthesize();
this.source = (mergedAnnotation.getDistance() > 0 ?
mergedAnnotation.getRoot().synthesize() : this.annotation);
this.root = mergedAnnotation.getRoot();
}
@Override
@@ -632,7 +631,7 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi
@Override
public String toString() {
return this.source.toString();
return this.root.synthesize().toString();
}
}