Back off from Kotlin BeanInfo creation for interfaces.

KotlinBeanInfoFactory no longer creates a BeanInfo for interfaces to follow general BeanInfo semantics.

Closes #2964
This commit is contained in:
Mark Paluch
2023-10-25 11:45:47 +02:00
parent 5dbd956a28
commit f060bcfe34
2 changed files with 17 additions and 0 deletions

View File

@@ -48,10 +48,15 @@ public class KotlinBeanInfoFactory implements BeanInfoFactory, Ordered {
@Override
public BeanInfo getBeanInfo(Class<?> beanClass) throws IntrospectionException {
if (beanClass.isInterface()) {
return null; // back-off to leave interface-based properties to the default mechanism.
}
if (!KotlinDetector.isKotlinReflectPresent() || !KotlinDetector.isKotlinType(beanClass)) {
return null;
}
KClass<?> kotlinClass = JvmClassMappingKt.getKotlinClass(beanClass);
List<PropertyDescriptor> pds = new ArrayList<>();