Skip to content

StackOverflowError when converting nested Lists [SPR-7289] #11948

@spring-projects-issues

Description

@spring-projects-issues

Oliver Becker opened SPR-7289 and commented

The following simple unit test demonstrates the problem:

ConversionService service = ConversionServiceFactory.createDefaultConversionService();
List<List<String>> list = Collections.singletonList(Collections.singletonList("Foo"));
Assert.assertNotNull(service.convert(list, String.class));

Most probably the problem stems from the changed method in TypeDescriptor

public synchronized TypeDescriptor getElementTypeDescriptor() {
if (this.elementType == null) {
this.elementType = forElementType(resolveElementType());
}
return this.elementType;
}

and the fact that forElementType returns this in this case.


Affects: 3.0.3

Issue Links:

Referenced from: commits 27b0403

Metadata

Metadata

Assignees

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