Update ref docs for Inner class names
This commit updates the reference manual to point out that one may use `.` instead of `$` as the nested class separator when providing a fully qualified class name for a nested class in XML configuration. This commit also updates the test for ClassUtils#forName to assert support for `.` instead of `$`. Closes gh-26540
This commit is contained in:
committed by
Sam Brannen
parent
1c6bab23ea
commit
77b7e49fb2
@@ -75,4 +75,7 @@ public class TestObject implements ITestObject, ITestInterface, Comparable<Objec
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
public static class NestedObject {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,8 @@ class ClassUtilsTests {
|
||||
assertThat(ClassUtils.forName("org.springframework.tests.sample.objects.TestObject[][]", classLoader)).isEqualTo(TestObject[][].class);
|
||||
assertThat(ClassUtils.forName(TestObject[][].class.getName(), classLoader)).isEqualTo(TestObject[][].class);
|
||||
assertThat(ClassUtils.forName("[[[S", classLoader)).isEqualTo(short[][][].class);
|
||||
assertThat(ClassUtils.forName("org.springframework.tests.sample.objects.TestObject$NestedObject", classLoader)).isEqualTo(TestObject.NestedObject.class);
|
||||
assertThat(ClassUtils.forName("org.springframework.tests.sample.objects.TestObject.NestedObject", classLoader)).isEqualTo(TestObject.NestedObject.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user