Backoff KotlinBeanInfoFactory for enum types.

We now no longer contribute properties for enum types.

Closes #2990
This commit is contained in:
Mark Paluch
2023-11-29 10:51:16 +01:00
parent 801dac992e
commit 5ac30bf620
2 changed files with 13 additions and 2 deletions

View File

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