diff --git a/src/main/groovy/grails/plugin/formfields/BeanPropertyAccessorImpl.groovy b/src/main/groovy/grails/plugin/formfields/BeanPropertyAccessorImpl.groovy index ad59a42d..49e80751 100644 --- a/src/main/groovy/grails/plugin/formfields/BeanPropertyAccessorImpl.groovy +++ b/src/main/groovy/grails/plugin/formfields/BeanPropertyAccessorImpl.groovy @@ -124,8 +124,8 @@ class BeanPropertyAccessorImpl implements BeanPropertyAccessor { @CompileStatic private List getSuperclassesAndInterfaces(Class type) { - List superclasses = [] - superclasses.addAll(ClassUtils.getAllSuperclasses(ClassUtils.primitiveToWrapper(type))) + List superclasses = new ArrayList<>() + superclasses.addAll((List) ClassUtils.getAllSuperclasses(ClassUtils.primitiveToWrapper(type))) for(Object it in ClassUtils.getAllInterfaces(type)) { Class interfaceCls = (Class)it String name = interfaceCls.name diff --git a/src/main/groovy/grails/plugin/formfields/DelegatingBeanPropertyAccessorImpl.groovy b/src/main/groovy/grails/plugin/formfields/DelegatingBeanPropertyAccessorImpl.groovy index ae700f30..334449b3 100644 --- a/src/main/groovy/grails/plugin/formfields/DelegatingBeanPropertyAccessorImpl.groovy +++ b/src/main/groovy/grails/plugin/formfields/DelegatingBeanPropertyAccessorImpl.groovy @@ -142,8 +142,8 @@ class DelegatingBeanPropertyAccessorImpl implements BeanPropertyAccessor { } private List getSuperclassesAndInterfaces(Class type) { - List superclasses = [] - superclasses.addAll(ClassUtils.getAllSuperclasses(ClassUtils.primitiveToWrapper(type))) + List superclasses = new ArrayList<>() + superclasses.addAll((List) ClassUtils.getAllSuperclasses(ClassUtils.primitiveToWrapper(type))) for (Object it in ClassUtils.getAllInterfaces(type)) { Class interfaceCls = (Class) it String name = interfaceCls.name