Skip to content

GenericConversionService: unable to autowire list types [SPR-6196] #10864

@spring-projects-issues

Description

@spring-projects-issues

Oliver Becker opened SPR-6196 and commented

Consider the following example:

class Foo {

@Autowired
private List<Bar> myBars;

// ...
}

In case the GenericConversionService has been deployed into the application context the property myBars cannot be converted because the conversion service resolves the ObjectToCollectionGenericConverter instead of the CollectionToCollectionGenericConverter.
This happens because of the super class resolving in method getConverter(Map<Class, GenericConverter>, Class) which fails to properly consider the List interface.
In case of an array type the conversion works without problems.


Affects: 3.0 RC1

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions