mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
parent
60611d94cf
commit
1266796921
@ -198,7 +198,6 @@ public class MappingResolverImpl implements MappingResolver {
|
||||
if ( sourceType.isLiteral()
|
||||
&& "java.lang.String".equals( sourceType.getFullyQualifiedName( ) )
|
||||
&& targetType.isNative() ) {
|
||||
// TODO: convey some error message
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -273,8 +272,6 @@ public class MappingResolverImpl implements MappingResolver {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns a reference to a method mapping the given source type to the given target type, if such a method
|
||||
* exists.
|
||||
@ -485,6 +482,7 @@ public class MappingResolverImpl implements MappingResolver {
|
||||
|
||||
if ( sourceRHS.getSourceErrorMessagePart() != null ) {
|
||||
messager.printMessage( mappingMethod.getExecutable(),
|
||||
positionHint,
|
||||
Message.GENERAL_AMBIGIOUS_MAPPING_METHOD,
|
||||
sourceRHS.getSourceErrorMessagePart(),
|
||||
returnType,
|
||||
@ -493,6 +491,7 @@ public class MappingResolverImpl implements MappingResolver {
|
||||
}
|
||||
else {
|
||||
messager.printMessage( mappingMethod.getExecutable(),
|
||||
positionHint,
|
||||
Message.GENERAL_AMBIGIOUS_FACTORY_METHOD,
|
||||
returnType,
|
||||
Strings.join( candidates, ", " )
|
||||
|
@ -100,7 +100,7 @@ public class QualifierTest {
|
||||
diagnostics = {
|
||||
@Diagnostic( type = ErroneousMapper.class,
|
||||
kind = Kind.ERROR,
|
||||
line = 29,
|
||||
line = 28,
|
||||
messageRegExp = "Ambiguous mapping methods found for mapping property "
|
||||
+ "\"java.lang.String title\" to java.lang.String.*" )
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user