mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#410 Small template improvement, removing empty lines between fields
This commit is contained in:
parent
6ba04920ef
commit
de18f2b1d3
@ -27,6 +27,8 @@ import java.lang.annotation.Target;
|
||||
/**
|
||||
* Configures the mapping between two bean types.
|
||||
*
|
||||
* <p>Note: either @BeanMapping#resultType or @BeanMapping#qualifiedBy must be specified</p>
|
||||
*
|
||||
* @author Sjaak Derksen
|
||||
*/
|
||||
@Target( ElementType.METHOD )
|
||||
|
@ -46,7 +46,7 @@ public class BeanMapping {
|
||||
if ( !resultTypeIsDefined && beanMapping.qualifiedBy().isEmpty() ) {
|
||||
messager.printMessage(
|
||||
Diagnostic.Kind.ERROR,
|
||||
"'resultType' and 'qualifiedBy' are are are undefined in @BeanMapping, "
|
||||
"'resultType' and 'qualifiedBy' are undefined in @BeanMapping, "
|
||||
+ "define at least one of them.",
|
||||
method
|
||||
);
|
||||
|
@ -33,10 +33,11 @@ import ${importedType.importName};
|
||||
<#nt><@includeModel object=annotation/>
|
||||
</#list>
|
||||
<#lt>${accessibility.keyword} class ${name}<#if superClassName??> extends ${superClassName}</#if><#if interfaceName??> implements ${interfaceName}</#if> {
|
||||
<#list fields as field>
|
||||
|
||||
<#list fields as field>
|
||||
<#nt> <@includeModel object=field/>
|
||||
</#list>
|
||||
|
||||
<#list methods as method>
|
||||
<#nt> <@includeModel object=method/>
|
||||
</#list>
|
||||
|
@ -65,7 +65,7 @@ public class ErroneousCollectionMappingTest {
|
||||
@Diagnostic(type = EmptyItererableMappingMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 35,
|
||||
messageRegExp = "'dateformat' and 'qualifiedBy' are are are undefined in @IterableMapping, "
|
||||
messageRegExp = "'dateformat' and 'qualifiedBy' are undefined in @IterableMapping, "
|
||||
+ "define at least one of them.")
|
||||
}
|
||||
)
|
||||
|
@ -186,7 +186,7 @@ public class QualifierTest {
|
||||
@Diagnostic( type = ErroneousMovieFactoryMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 37,
|
||||
messageRegExp = "'resultType' and 'qualifiedBy' are are are undefined in @BeanMapping, "
|
||||
messageRegExp = "'resultType' and 'qualifiedBy' are undefined in @BeanMapping, "
|
||||
+ "define at least one of them." )
|
||||
}
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user