mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
This commit is contained in:
parent
6a46ac068f
commit
fd08330b94
@ -232,10 +232,13 @@ public class PropertyMapping extends ModelElement {
|
||||
ctx.getMessager().printMessage(
|
||||
Diagnostic.Kind.ERROR,
|
||||
String.format(
|
||||
"Can't map %s to \"%s %s\".",
|
||||
"Can't map %s to \"%s %s\". "
|
||||
+ "Consider to declare/implement a mapping method: \"%s map(%s value)\".",
|
||||
sourceElement,
|
||||
targetType,
|
||||
targetPropertyName
|
||||
targetPropertyName,
|
||||
targetType,
|
||||
getSourceType() /* original source type */
|
||||
),
|
||||
method.getExecutable()
|
||||
);
|
||||
|
@ -46,11 +46,13 @@ public class ErroneousMappingsTest {
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 27,
|
||||
messageRegExp = "Can't map property \"boolean foo\" to \"int foo\"\\."),
|
||||
messageRegExp = "Can't map property \"boolean foo\" to \"int foo\". Consider to declare/implement a "
|
||||
+ "mapping method: \"int map\\(boolean value\\)\"."),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
messageRegExp = "Can't map property \"int foo\" to \"boolean foo\"\\."),
|
||||
messageRegExp = "Can't map property \"int foo\" to \"boolean foo\". Consider to declare/implement a "
|
||||
+ "mapping method: \"boolean map\\(int value\\)\"."),
|
||||
@Diagnostic(type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 31,
|
||||
|
Loading…
x
Reference in New Issue
Block a user