Use Class#componentType() for consistency with arrayType()
Java 12 introduced java.lang.Class#componentType() as a shortcut for
getComponentType().
Since we started using arrayType() in fe5560400c, this commit switches
to componentType() for consistent API usage style.
This commit is contained in:
@@ -145,7 +145,7 @@ class BeanUtilsTests {
|
||||
for (PropertyDescriptor descriptor : descriptors) {
|
||||
if ("containedBeans".equals(descriptor.getName())) {
|
||||
assertThat(descriptor.getPropertyType().isArray()).as("Property should be an array").isTrue();
|
||||
assertThat(ContainedBean.class).isEqualTo(descriptor.getPropertyType().getComponentType());
|
||||
assertThat(ContainedBean.class).isEqualTo(descriptor.getPropertyType().componentType());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user