julianps / modelmapper-module-vavr

Fills the gap between vavr.io and modelmapper
Apache License 2.0
5 stars 2 forks source link

Convert Java List to Vavr List #5

Closed zhongdj closed 4 years ago

zhongdj commented 5 years ago

Once we update the test case as following:

    static SourceList stubSourceList() {
        final SourceList sourceList = new SourceList();
        sourceList.list = List.of(stubSource(2), stubSource(5)).toJavaList();
        return sourceList;
    }

    @Data
    static class SourceList {
        java.util.List<Source> list;
    }
    @Test
    public void testNormalList() {
        final StubFactory.DestList destList = modelMapper.map(StubFactory.stubSourceList(), StubFactory.DestList.class);
        checkListResult(destList);
    }

Then the above case will fail.

julianps commented 5 years ago

Hi, i will invest this in the next days. Thanx for reporting.

julianps commented 5 years ago

Hi @zhongdj, when i change StubFactory.DestList to also be a java.util.list, it works for me. Can you give me a hint of what you're trying to achieve? Cheers, Julian

julianps commented 5 years ago

hi @zhongdj can you give me an update on this?