mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Merge branch '7.0.x'
This commit is contained in:
+1
-1
@@ -195,7 +195,7 @@ final class ClassFileMethodMetadata implements MethodMetadata {
|
||||
builder.append(this.methodName);
|
||||
builder.append('(');
|
||||
builder.append(Stream.of(this.descriptor.parameterArray())
|
||||
.map(desc -> desc.packageName() + "." + desc.displayName())
|
||||
.map(ClassFileAnnotationMetadata::resolveTypeName)
|
||||
.collect(Collectors.joining(",")));
|
||||
builder.append(')');
|
||||
return builder.toString();
|
||||
|
||||
+15
@@ -108,6 +108,12 @@ public abstract class AbstractMethodMetadataTests {
|
||||
assertThat(getTagged(WithMethod.class).getMethodName()).isEqualTo("test");
|
||||
}
|
||||
|
||||
@Test
|
||||
void toStringMethodShowsPrimitives() {
|
||||
assertThat(getTagged(WithMethodParameters.class).toString())
|
||||
.isEqualTo("public java.lang.String org.springframework.core.type.AbstractMethodMetadataTests$WithMethodParameters.test(java.lang.String[],int)");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getDeclaringClassReturnsDeclaringClass() {
|
||||
assertThat(getTagged(WithMethod.class).getDeclaringClassName()).isEqualTo(WithMethod.class.getName());
|
||||
@@ -269,6 +275,15 @@ public abstract class AbstractMethodMetadataTests {
|
||||
|
||||
}
|
||||
|
||||
public static class WithMethodParameters {
|
||||
|
||||
@Tag
|
||||
public String test(String[] names, int age) {
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class LocalType {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user