diff --git a/processor/src/main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl b/processor/src/main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl index 789b6a409..00155f5d6 100644 --- a/processor/src/main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl +++ b/processor/src/main/resources/org.mapstruct.ap.model.BeanMappingMethod.ftl @@ -25,7 +25,7 @@ public <@includeModel object=returnType/> ${name}(<#list parameters as param><@i } <#if !existingInstanceMapping> - ${resultType.name} ${resultName} = <#if hasFactoryMethod><#if factoryMethod.hasDeclaringMapper>${factoryMethod.mapperVariableName}.${factoryMethod.name}()<#else>new ${resultType.name}(); + ${resultType.name} ${resultName} = <#if hasFactoryMethod><@includeModel object=factoryMethod/><#else>new ${resultType.name}(); <#if (sourceParameters?size > 1)> <#list sourceParameters as sourceParam> diff --git a/processor/src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl b/processor/src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl index c9b799180..fd5aa5a40 100644 --- a/processor/src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl +++ b/processor/src/main/resources/org.mapstruct.ap.model.FactoryMethod.ftl @@ -18,4 +18,4 @@ limitations under the License. --> -<#if declaringMapper??>${mapperVariableName}.${name}( ${ext.input} ) \ No newline at end of file +<#if hasDeclaringMapper>${mapperVariableName}.${name}() \ No newline at end of file