#339 error message clarification: ambiguous mapping method

This commit is contained in:
sjaakd 2014-11-17 10:09:29 +01:00
parent 5bca22702e
commit 6a46ac068f
3 changed files with 3 additions and 4 deletions

View File

@ -426,8 +426,7 @@ public class MappingResolverImpl implements MappingResolver {
if ( candidates.size() > 1 ) {
String errorMsg = String.format(
"Ambiguous mapping methods found for mapping " + mappedElement + " from %s to %s: %s.",
sourceType,
"Ambiguous mapping methods found for mapping " + mappedElement + " to %s: %s.",
returnType,
Strings.join( candidates, ", " )
);

View File

@ -84,7 +84,7 @@ public class ComplexInheritanceTest {
line = 32,
messageRegExp =
"Ambiguous mapping methods found for mapping property "
+ "\"org.mapstruct.ap.test.inheritance.complex.SourceExt prop1\" from .*SourceExt to .*Reference: "
+ "\"org.mapstruct.ap.test.inheritance.complex.SourceExt prop1\" to .*Reference: "
+ ".*Reference .*AdditionalMappingHelper\\.asReference\\(.*SourceBase source\\), "
+ ".*Reference .*AdditionalMappingHelper\\.asReference\\(.*AdditionalFooSource source\\)"))
public void ambiguousMappingMethodsReportError() {

View File

@ -110,7 +110,7 @@ public class QualifierTest {
kind = Kind.ERROR,
line = 42,
messageRegExp = "Ambiguous mapping methods found for mapping property "
+ "\"java.lang.String title\" from java.lang.String to java.lang.String.*" )
+ "\"java.lang.String title\" to java.lang.String.*" )
}
)
public void shouldNotProduceMatchingMethod() {