#2788 Improve unmapped source properties message for forged methods

This commit is contained in:
Zegveld 2024-02-11 13:29:34 +01:00 committed by GitHub
parent ca1fd0d85d
commit bb1cd63485
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
28 changed files with 547 additions and 129 deletions

View File

@ -1718,53 +1718,21 @@ public class BeanMappingMethod extends NormalTypeMappingMethod {
}
else if ( !unprocessedTargetProperties.isEmpty() && unmappedTargetPolicy.requiresReport() ) {
if ( !( method instanceof ForgedMethod ) ) {
Message msg = unmappedTargetPolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ?
Message.BEANMAPPING_UNMAPPED_TARGETS_ERROR : Message.BEANMAPPING_UNMAPPED_TARGETS_WARNING;
Object[] args = new Object[] {
MessageFormat.format(
"{0,choice,1#property|1<properties}: \"{1}\"",
unprocessedTargetProperties.size(),
Strings.join( unprocessedTargetProperties.keySet(), ", " )
)
};
Message unmappedPropertiesMsg;
Message unmappedForgedPropertiesMsg;
if ( unmappedTargetPolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ) {
unmappedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_TARGETS_ERROR;
unmappedForgedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_FORGED_TARGETS_ERROR;
}
else {
unmappedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_TARGETS_WARNING;
unmappedForgedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_FORGED_TARGETS_WARNING;
}
ctx.getMessager().printMessage(
method.getExecutable(),
msg,
args
);
}
else if ( !ctx.isErroneous() ) {
Message msg = unmappedTargetPolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ?
Message.BEANMAPPING_UNMAPPED_FORGED_TARGETS_ERROR :
Message.BEANMAPPING_UNMAPPED_FORGED_TARGETS_WARNING;
String sourceErrorMessage = method.getParameters().get( 0 ).getType().describe();
String targetErrorMessage = method.getReturnType().describe();
if ( ( (ForgedMethod) method ).getHistory() != null ) {
ForgedMethodHistory history = ( (ForgedMethod) method ).getHistory();
sourceErrorMessage = history.createSourcePropertyErrorMessage();
targetErrorMessage = MessageFormat.format(
"\"{0} {1}\"",
history.getTargetType().describe(),
history.createTargetPropertyName()
);
}
Object[] args = new Object[] {
MessageFormat.format(
"{0,choice,1#property|1<properties}: \"{1}\"",
unprocessedTargetProperties.size(),
Strings.join( unprocessedTargetProperties.keySet(), ", " )
),
sourceErrorMessage,
targetErrorMessage
};
ctx.getMessager().printMessage(
method.getExecutable(),
msg,
args
);
}
reportErrorForUnmappedProperties(
unprocessedTargetProperties,
unmappedPropertiesMsg,
unmappedForgedPropertiesMsg );
}
}
@ -1782,22 +1750,67 @@ public class BeanMappingMethod extends NormalTypeMappingMethod {
private void reportErrorForUnmappedSourcePropertiesIfRequired() {
ReportingPolicyGem unmappedSourcePolicy = getUnmappedSourcePolicy();
if ( !unprocessedSourceProperties.isEmpty() && unmappedSourcePolicy.requiresReport() ) {
Message unmappedPropertiesMsg;
Message unmappedForgedPropertiesMsg;
if ( unmappedSourcePolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ) {
unmappedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_SOURCES_ERROR;
unmappedForgedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_FORGED_SOURCES_ERROR;
}
else {
unmappedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_SOURCES_WARNING;
unmappedForgedPropertiesMsg = Message.BEANMAPPING_UNMAPPED_FORGED_SOURCES_WARNING;
}
Message msg = unmappedSourcePolicy.getDiagnosticKind() == Diagnostic.Kind.ERROR ?
Message.BEANMAPPING_UNMAPPED_SOURCES_ERROR : Message.BEANMAPPING_UNMAPPED_SOURCES_WARNING;
reportErrorForUnmappedProperties(
unprocessedSourceProperties,
unmappedPropertiesMsg,
unmappedForgedPropertiesMsg );
}
}
private void reportErrorForUnmappedProperties(Map<String, Accessor> unmappedProperties,
Message unmappedPropertiesMsg,
Message unmappedForgedPropertiesMsg) {
if ( !( method instanceof ForgedMethod ) ) {
Object[] args = new Object[] {
MessageFormat.format(
"{0,choice,1#property|1<properties}: \"{1}\"",
unprocessedSourceProperties.size(),
Strings.join( unprocessedSourceProperties.keySet(), ", " )
unmappedProperties.size(),
Strings.join( unmappedProperties.keySet(), ", " )
)
};
ctx.getMessager().printMessage(
method.getExecutable(),
msg,
unmappedPropertiesMsg,
args
);
}
else if ( !ctx.isErroneous() ) {
String sourceErrorMessage = method.getParameters().get( 0 ).getType().describe();
String targetErrorMessage = method.getReturnType().describe();
if ( ( (ForgedMethod) method ).getHistory() != null ) {
ForgedMethodHistory history = ( (ForgedMethod) method ).getHistory();
sourceErrorMessage = history.createSourcePropertyErrorMessage();
targetErrorMessage = MessageFormat.format(
"\"{0} {1}\"",
history.getTargetType().describe(),
history.createTargetPropertyName()
);
}
Object[] args = new Object[] {
MessageFormat.format(
"{0,choice,1#property|1<properties}: \"{1}\"",
unmappedProperties.size(),
Strings.join( unmappedProperties.keySet(), ", " )
),
sourceErrorMessage,
targetErrorMessage
};
ctx.getMessager().printMessage(
method.getExecutable(),
unmappedForgedPropertiesMsg,
args
);
}

View File

@ -39,6 +39,8 @@ public enum Message {
BEANMAPPING_UNMAPPED_FORGED_TARGETS_ERROR( "Unmapped target %s. Mapping from %s to %s." ),
BEANMAPPING_UNMAPPED_SOURCES_WARNING( "Unmapped source %s.", Diagnostic.Kind.WARNING ),
BEANMAPPING_UNMAPPED_SOURCES_ERROR( "Unmapped source %s." ),
BEANMAPPING_UNMAPPED_FORGED_SOURCES_WARNING( "Unmapped source %s. Mapping from %s to %s.", Diagnostic.Kind.WARNING ),
BEANMAPPING_UNMAPPED_FORGED_SOURCES_ERROR( "Unmapped source %s. Mapping from %s to %s." ),
BEANMAPPING_MISSING_IGNORED_SOURCES_ERROR( "Ignored unknown source %s." ),
BEANMAPPING_CYCLE_BETWEEN_PROPERTIES( "Cycle(s) between properties given via dependsOn(): %s." ),
BEANMAPPING_UNKNOWN_PROPERTY_IN_DEPENDS_ON( "\"%s\" is no property of the method return type." ),

View File

@ -38,25 +38,38 @@ import org.mapstruct.ap.test.nestedbeans.unmappable.Wheel;
import org.mapstruct.ap.test.nestedbeans.unmappable.WheelDto;
import org.mapstruct.ap.test.nestedbeans.unmappable.Word;
import org.mapstruct.ap.test.nestedbeans.unmappable.WordDto;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableEnumMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceEnumMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableSourceValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.erroneous.UnmappableTargetValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.ignore.UnmappableIgnoreValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableWarnValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableSourceWarnValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.warn.UnmappableTargetWarnValuePropertyMapper;
import org.mapstruct.ap.testutil.IssueKey;
import org.mapstruct.ap.testutil.ProcessorTest;
import org.mapstruct.ap.testutil.WithClasses;
import org.mapstruct.ap.testutil.compilation.annotation.CompilationResult;
@ -88,12 +101,12 @@ public class DottedErrorMessageTest {
@ProcessorTest
@WithClasses({
UnmappableDeepNestingMapper.class
UnmappableTargetDeepNestingMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableDeepNestingMapper.class,
@Diagnostic(type = UnmappableTargetDeepNestingMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 14,
message = "Unmapped target property: \"rgb\". Mapping from " + PROPERTY +
@ -101,17 +114,17 @@ public class DottedErrorMessageTest {
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'.")
}
)
public void testDeepNestedBeans() {
public void testTargetDeepNestedBeans() {
}
@ProcessorTest
@WithClasses({
UnmappableDeepListMapper.class
UnmappableTargetDeepListMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableDeepListMapper.class,
@Diagnostic(type = UnmappableTargetDeepListMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 14,
message = "Unmapped target property: \"left\". Mapping from " + COLLECTION_ELEMENT +
@ -119,17 +132,17 @@ public class DottedErrorMessageTest {
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'.")
}
)
public void testIterables() {
public void testTargetIterables() {
}
@ProcessorTest
@WithClasses({
UnmappableDeepMapKeyMapper.class
UnmappableTargetDeepMapKeyMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableDeepMapKeyMapper.class,
@Diagnostic(type = UnmappableTargetDeepMapKeyMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 14,
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_KEY +
@ -137,17 +150,17 @@ public class DottedErrorMessageTest {
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'.")
}
)
public void testMapKeys() {
public void testTargetMapKeys() {
}
@ProcessorTest
@WithClasses({
UnmappableDeepMapValueMapper.class
UnmappableTargetDeepMapValueMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableDeepMapValueMapper.class,
@Diagnostic(type = UnmappableTargetDeepMapValueMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 14,
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_VALUE +
@ -155,17 +168,17 @@ public class DottedErrorMessageTest {
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'.")
}
)
public void testMapValues() {
public void testTargetMapValues() {
}
@ProcessorTest
@WithClasses({
UnmappableCollectionElementPropertyMapper.class
UnmappableTargetCollectionElementPropertyMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableCollectionElementPropertyMapper.class,
@Diagnostic(type = UnmappableTargetCollectionElementPropertyMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 14,
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
@ -173,17 +186,17 @@ public class DottedErrorMessageTest {
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'.")
}
)
public void testCollectionElementProperty() {
public void testTargetCollectionElementProperty() {
}
@ProcessorTest
@WithClasses({
UnmappableValuePropertyMapper.class
UnmappableTargetValuePropertyMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableValuePropertyMapper.class,
@Diagnostic(type = UnmappableTargetValuePropertyMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 14,
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
@ -191,17 +204,131 @@ public class DottedErrorMessageTest {
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
}
)
public void testMapValueProperty() {
public void testTargetMapValueProperty() {
}
@IssueKey( "2788" )
@ProcessorTest
@WithClasses({
UnmappableEnumMapper.class
UnmappableSourceDeepNestingMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableEnumMapper.class,
@Diagnostic(type = UnmappableSourceDeepNestingMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 16,
message = "Unmapped source property: \"cmyk\". Mapping from " + PROPERTY +
" \"Color house.roof.color\" to \"ColorDto house.roof.color\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'.")
}
)
public void testSourceDeepNestedBeans() {
}
@IssueKey( "2788" )
@ProcessorTest
@WithClasses({
UnmappableSourceDeepListMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableSourceDeepListMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 16,
message = "Unmapped source property: \"right\". Mapping from " + COLLECTION_ELEMENT +
" \"Wheel car.wheels\" to \"WheelDto car.wheels\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'.")
}
)
public void testSourceIterables() {
}
@IssueKey( "2788" )
@ProcessorTest
@WithClasses({
UnmappableSourceDeepMapKeyMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableSourceDeepMapKeyMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 16,
message = "Unmapped source property: \"meaning\". Mapping from " + MAP_KEY +
" \"Word dictionary.wordMap{:key}\" to \"WordDto dictionary.wordMap{:key}\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'.")
}
)
public void testSourceMapKeys() {
}
@IssueKey( "2788" )
@ProcessorTest
@WithClasses({
UnmappableSourceDeepMapValueMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableSourceDeepMapValueMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 16,
message = "Unmapped source property: \"meaning\". Mapping from " + MAP_VALUE +
" \"ForeignWord dictionary.wordMap{:value}\" to \"ForeignWordDto dictionary.wordMap{:value}\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'.")
}
)
public void testSourceMapValues() {
}
@IssueKey( "2788" )
@ProcessorTest
@WithClasses({
UnmappableSourceCollectionElementPropertyMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableSourceCollectionElementPropertyMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 16,
message = "Unmapped source property: \"size\". Mapping from " + PROPERTY +
" \"Info computers[].info\" to \"InfoDto computers[].info\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'.")
}
)
public void testSourceCollectionElementProperty() {
}
@IssueKey( "2788" )
@ProcessorTest
@WithClasses({
UnmappableSourceValuePropertyMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableSourceValuePropertyMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 16,
message = "Unmapped source property: \"size\". Mapping from " + PROPERTY +
" \"Info catNameMap{:value}.info\" to \"InfoDto catNameMap{:value}.info\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
}
)
public void testSourceMapValueProperty() {
}
@ProcessorTest
@WithClasses({
UnmappableSourceEnumMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.FAILED,
diagnostics = {
@Diagnostic(type = UnmappableSourceEnumMapper.class,
kind = javax.tools.Diagnostic.Kind.ERROR,
line = 25,
message =
@ -211,54 +338,54 @@ public class DottedErrorMessageTest {
)
}
)
public void testMapEnumProperty() {
public void testSourceMapEnumProperty() {
}
@ProcessorTest
@WithClasses({
UnmappableWarnDeepNestingMapper.class,
UnmappableWarnDeepListMapper.class,
UnmappableWarnDeepMapKeyMapper.class,
UnmappableWarnDeepMapValueMapper.class,
UnmappableWarnCollectionElementPropertyMapper.class,
UnmappableWarnValuePropertyMapper.class
UnmappableTargetWarnDeepNestingMapper.class,
UnmappableTargetWarnDeepListMapper.class,
UnmappableTargetWarnDeepMapKeyMapper.class,
UnmappableTargetWarnDeepMapValueMapper.class,
UnmappableTargetWarnCollectionElementPropertyMapper.class,
UnmappableTargetWarnValuePropertyMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.SUCCEEDED,
diagnostics = {
@Diagnostic(type = UnmappableWarnDeepNestingMapper.class,
@Diagnostic(type = UnmappableTargetWarnDeepNestingMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 13,
line = 16,
message = "Unmapped target property: \"rgb\". Mapping from " + PROPERTY +
" \"Color house.roof.color\" to \"ColorDto house.roof.color\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'."),
@Diagnostic(type = UnmappableWarnDeepListMapper.class,
@Diagnostic(type = UnmappableTargetWarnDeepListMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 13,
line = 16,
message = "Unmapped target property: \"left\". Mapping from " + COLLECTION_ELEMENT +
" \"Wheel car.wheels\" to \"WheelDto car.wheels\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'."),
@Diagnostic(type = UnmappableWarnDeepMapKeyMapper.class,
@Diagnostic(type = UnmappableTargetWarnDeepMapKeyMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 13,
line = 16,
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_KEY +
" \"Word dictionary.wordMap{:key}\" to \"WordDto dictionary.wordMap{:key}\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'."),
@Diagnostic(type = UnmappableWarnDeepMapValueMapper.class,
@Diagnostic(type = UnmappableTargetWarnDeepMapValueMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 13,
line = 16,
message = "Unmapped target property: \"pronunciation\". Mapping from " + MAP_VALUE +
" \"ForeignWord dictionary.wordMap{:value}\" to \"ForeignWordDto dictionary.wordMap{:value}\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'."),
@Diagnostic(type = UnmappableWarnCollectionElementPropertyMapper.class,
@Diagnostic(type = UnmappableTargetWarnCollectionElementPropertyMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 13,
line = 16,
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
" \"Info computers[].info\" to \"InfoDto computers[].info\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'."),
@Diagnostic(type = UnmappableWarnValuePropertyMapper.class,
@Diagnostic(type = UnmappableTargetWarnValuePropertyMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 13,
line = 16,
message = "Unmapped target property: \"color\". Mapping from " + PROPERTY +
" \"Info catNameMap{:value}.info\" to \"InfoDto catNameMap{:value}.info\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
@ -267,6 +394,60 @@ public class DottedErrorMessageTest {
public void testWarnUnmappedTargetProperties() {
}
@IssueKey( "2788" )
@ProcessorTest
@WithClasses({
UnmappableSourceWarnDeepNestingMapper.class,
UnmappableSourceWarnDeepListMapper.class,
UnmappableSourceWarnDeepMapKeyMapper.class,
UnmappableSourceWarnDeepMapValueMapper.class,
UnmappableSourceWarnCollectionElementPropertyMapper.class,
UnmappableSourceWarnValuePropertyMapper.class
})
@ExpectedCompilationOutcome(
value = CompilationResult.SUCCEEDED,
diagnostics = {
@Diagnostic(type = UnmappableSourceWarnDeepNestingMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 16,
message = "Unmapped source property: \"cmyk\". Mapping from " + PROPERTY +
" \"Color house.roof.color\" to \"ColorDto house.roof.color\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepNestingMapper'."),
@Diagnostic(type = UnmappableSourceWarnDeepListMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 16,
message = "Unmapped source property: \"right\". Mapping from " + COLLECTION_ELEMENT +
" \"Wheel car.wheels\" to \"WheelDto car.wheels\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepListMapper'."),
@Diagnostic(type = UnmappableSourceWarnDeepMapKeyMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 16,
message = "Unmapped source property: \"meaning\". Mapping from " + MAP_KEY +
" \"Word dictionary.wordMap{:key}\" to \"WordDto dictionary.wordMap{:key}\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapKeyMapper'."),
@Diagnostic(type = UnmappableSourceWarnDeepMapValueMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 16,
message = "Unmapped source property: \"meaning\". Mapping from " + MAP_VALUE +
" \"ForeignWord dictionary.wordMap{:value}\" to \"ForeignWordDto dictionary.wordMap{:value}\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseDeepMapValueMapper'."),
@Diagnostic(type = UnmappableSourceWarnCollectionElementPropertyMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 16,
message = "Unmapped source property: \"size\". Mapping from " + PROPERTY +
" \"Info computers[].info\" to \"InfoDto computers[].info\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseCollectionElementPropertyMapper'."),
@Diagnostic(type = UnmappableSourceWarnValuePropertyMapper.class,
kind = javax.tools.Diagnostic.Kind.WARNING,
line = 16,
message = "Unmapped source property: \"size\". Mapping from " + PROPERTY +
" \"Info catNameMap{:value}.info\" to \"InfoDto catNameMap{:value}.info\"." +
" Occured at 'UserDto userToUserDto(User user)' in 'BaseValuePropertyMapper'.")
}
)
public void testWarnUnmappedSourceProperties() {
}
@ProcessorTest
@WithClasses({
UnmappableIgnoreDeepNestingMapper.class,

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
import static org.mapstruct.ReportingPolicy.ERROR;
import static org.mapstruct.ReportingPolicy.IGNORE;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
public abstract class UnmappableSourceCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
import static org.mapstruct.ReportingPolicy.ERROR;
import static org.mapstruct.ReportingPolicy.IGNORE;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
public abstract class UnmappableSourceDeepListMapper extends BaseDeepListMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
import static org.mapstruct.ReportingPolicy.ERROR;
import static org.mapstruct.ReportingPolicy.IGNORE;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
public abstract class UnmappableSourceDeepMapKeyMapper extends BaseDeepMapKeyMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
import static org.mapstruct.ReportingPolicy.ERROR;
import static org.mapstruct.ReportingPolicy.IGNORE;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
public abstract class UnmappableSourceDeepMapValueMapper extends BaseDeepMapValueMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
import static org.mapstruct.ReportingPolicy.ERROR;
import static org.mapstruct.ReportingPolicy.IGNORE;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
public abstract class UnmappableSourceDeepNestingMapper extends BaseDeepNestingMapper {
}

View File

@ -20,7 +20,7 @@ import org.mapstruct.ap.test.nestedbeans.unmappable.User;
import org.mapstruct.ap.test.nestedbeans.unmappable.UserDto;
@Mapper
public abstract class UnmappableEnumMapper {
public abstract class UnmappableSourceEnumMapper {
abstract UserDto userToUserDto(User user);

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.erroneous;
import static org.mapstruct.ReportingPolicy.ERROR;
import static org.mapstruct.ReportingPolicy.IGNORE;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = ERROR )
public abstract class UnmappableSourceValuePropertyMapper extends BaseValuePropertyMapper {
}

View File

@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
public abstract class UnmappableCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
public abstract class UnmappableTargetCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
}

View File

@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
public abstract class UnmappableDeepListMapper extends BaseDeepListMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
public abstract class UnmappableTargetDeepListMapper extends BaseDeepListMapper {
}

View File

@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
public abstract class UnmappableDeepMapKeyMapper extends BaseDeepMapKeyMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
public abstract class UnmappableTargetDeepMapKeyMapper extends BaseDeepMapKeyMapper {
}

View File

@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
public abstract class UnmappableDeepMapValueMapper extends BaseDeepMapValueMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
public abstract class UnmappableTargetDeepMapValueMapper extends BaseDeepMapValueMapper {
}

View File

@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
public abstract class UnmappableDeepNestingMapper extends BaseDeepNestingMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
public abstract class UnmappableTargetDeepNestingMapper extends BaseDeepNestingMapper {
}

View File

@ -10,6 +10,6 @@ import org.mapstruct.ReportingPolicy;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR)
public abstract class UnmappableValuePropertyMapper extends BaseValuePropertyMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = ReportingPolicy.ERROR )
public abstract class UnmappableTargetValuePropertyMapper extends BaseValuePropertyMapper {
}

View File

@ -5,10 +5,13 @@
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class)
public abstract class UnmappableWarnCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
public abstract class UnmappableSourceWarnCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
}

View File

@ -5,10 +5,13 @@
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class)
public abstract class UnmappableWarnDeepListMapper extends BaseDeepListMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
public abstract class UnmappableSourceWarnDeepListMapper extends BaseDeepListMapper {
}

View File

@ -5,10 +5,13 @@
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class)
public abstract class UnmappableWarnDeepMapKeyMapper extends BaseDeepMapKeyMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
public abstract class UnmappableSourceWarnDeepMapKeyMapper extends BaseDeepMapKeyMapper {
}

View File

@ -5,10 +5,13 @@
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class)
public abstract class UnmappableWarnDeepMapValueMapper extends BaseDeepMapValueMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
public abstract class UnmappableSourceWarnDeepMapValueMapper extends BaseDeepMapValueMapper {
}

View File

@ -5,10 +5,13 @@
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class)
public abstract class UnmappableWarnDeepNestingMapper extends BaseDeepNestingMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
public abstract class UnmappableSourceWarnDeepNestingMapper extends BaseDeepNestingMapper {
}

View File

@ -5,10 +5,13 @@
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper(uses = RoofTypeMapper.class)
public abstract class UnmappableWarnValuePropertyMapper extends BaseValuePropertyMapper {
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = IGNORE, unmappedSourcePolicy = WARN )
public abstract class UnmappableSourceWarnValuePropertyMapper extends BaseValuePropertyMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseCollectionElementPropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
public abstract class UnmappableTargetWarnCollectionElementPropertyMapper extends BaseCollectionElementPropertyMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepListMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
public abstract class UnmappableTargetWarnDeepListMapper extends BaseDeepListMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapKeyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
public abstract class UnmappableTargetWarnDeepMapKeyMapper extends BaseDeepMapKeyMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepMapValueMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
public abstract class UnmappableTargetWarnDeepMapValueMapper extends BaseDeepMapValueMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseDeepNestingMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
public abstract class UnmappableTargetWarnDeepNestingMapper extends BaseDeepNestingMapper {
}

View File

@ -0,0 +1,17 @@
/*
* Copyright MapStruct Authors.
*
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0
*/
package org.mapstruct.ap.test.nestedbeans.unmappable.warn;
import static org.mapstruct.ReportingPolicy.IGNORE;
import static org.mapstruct.ReportingPolicy.WARN;
import org.mapstruct.Mapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.BaseValuePropertyMapper;
import org.mapstruct.ap.test.nestedbeans.unmappable.RoofTypeMapper;
@Mapper( uses = RoofTypeMapper.class, unmappedTargetPolicy = WARN, unmappedSourcePolicy = IGNORE )
public abstract class UnmappableTargetWarnValuePropertyMapper extends BaseValuePropertyMapper {
}