mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#191 extend delegate template to avoid duplicate mapper instantiation
This commit is contained in:
parent
a8b153d980
commit
9711d5615e
@ -19,8 +19,12 @@
|
||||
|
||||
-->
|
||||
public ${name}() {
|
||||
this( new ${delegateName}() );
|
||||
}
|
||||
|
||||
private ${name}( ${delegateName} delegate ) {
|
||||
<#if invokeSuperConstructor>
|
||||
super( new ${delegateName}() );
|
||||
super( delegate );
|
||||
</#if>
|
||||
this.delegate = new ${delegateName}();
|
||||
this.delegate = delegate;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user