Skip to content

ConversionService should remain capable of converting multidimensional array. [SPR-11608] #16231

@spring-projects-issues

Description

@spring-projects-issues

Christoph Strobl opened SPR-11608 and commented

The following conversion works in 4.0.2 but fails in 4.0.3.

  @Test
  public void multidimensionalArrayToListConversionShouldConvertEntriesCorrectly() {
    String[][] grid = new String[][] { new String[] { "1", "2", "3", "4" }, new String[] { "5", "6", "7", "8" },
        new String[] { "9", "10", "11", "12" } };

    ConversionService conversionService = ConversionServiceFactory.createDefaultConversionService();
    List<String[]> converted = conversionService.convert(grid, List.class);
    String[][] convertedBack = conversionService.convert(converted, String[][].class);

    Assert.assertArrayEquals(grid, convertedBack);
  }

Affects: 4.0.3

Referenced from: commits 5c9fc09, b9bac1d

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