diff --git a/processor/src/main/java/org/mapstruct/ap/internal/model/source/SourceReference.java b/processor/src/main/java/org/mapstruct/ap/internal/model/source/SourceReference.java index 088123d5d..e346900fd 100644 --- a/processor/src/main/java/org/mapstruct/ap/internal/model/source/SourceReference.java +++ b/processor/src/main/java/org/mapstruct/ap/internal/model/source/SourceReference.java @@ -18,6 +18,8 @@ */ package org.mapstruct.ap.internal.model.source; +import static org.mapstruct.ap.internal.util.Collections.first; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -32,8 +34,6 @@ import org.mapstruct.ap.internal.util.FormattingMessager; import org.mapstruct.ap.internal.util.Message; import org.mapstruct.ap.internal.util.Strings; -import static org.mapstruct.ap.internal.util.Collections.first; - /** * This class describes the source side of a property mapping. *

@@ -176,7 +176,7 @@ public class SourceReference { Map sourceReadAccessors = newType.getPropertyReadAccessors(); for ( Map.Entry getter : sourceReadAccessors.entrySet() ) { if ( getter.getKey().equals( entryName ) ) { - newType = typeFactory.getType( getter.getValue().getReturnType() ); + newType = typeFactory.getReturnType( newType.getTypeElement(), getter.getValue() ); sourceEntries.add( new PropertyEntry( entryName, getter.getValue(), newType ) ); matchFound = true; break;