mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Polishing
This commit is contained in:
@@ -220,7 +220,7 @@ class ExtendedBeanInfo implements BeanInfo {
|
||||
*/
|
||||
@Override
|
||||
public PropertyDescriptor[] getPropertyDescriptors() {
|
||||
return this.propertyDescriptors.toArray(new PropertyDescriptor[0]);
|
||||
return this.propertyDescriptors.toArray(PropertyDescriptorUtils.EMPTY_PROPERTY_DESCRIPTOR_ARRAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -65,7 +65,7 @@ public interface SmartFactoryBean<T> extends FactoryBean<T> {
|
||||
* @see #supportsType(Class)
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
default <S> @Nullable S getObject(Class<S> type) throws Exception{
|
||||
default <S> @Nullable S getObject(Class<S> type) throws Exception {
|
||||
Class<?> objectType = getObjectType();
|
||||
return (objectType != null && type.isAssignableFrom(objectType) ? (S) getObject() : null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user