Expected behavior
@Condition method should be correctly applied on correct source parameters when we are using nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS
Actual behavior
When we have the mapping mapping with 2 source parameters, for eg:
@Mapping(target = "browserId", source = "requestBean.deviceInfo.browserId")
public abstract AudienceProfileRequest map(RequestBean requestBean, String slotId);
If we are mapping some Integer source field from RequestBean to AudienceProfileRequest then the condition is applied on slotId which is not expected. Following is the snippet of the generated code:
Integer browserId = requestBeanDeviceInfoBrowserId( requestBean );
if ( prechecksSupport.isNotBlank( slotId ) ) {
audienceProfileRequest.browserId( browserId );
}
Steps to reproduce the problem
https://github.com/altaiezior/mapstruct-issues/tree/master/issue-4037
MapStruct Version
MapStruct 1.5.5
Expected behavior
@Conditionmethod should be correctly applied on correct source parameters when we are usingnullValueCheckStrategy = NullValueCheckStrategy.ALWAYSActual behavior
When we have the mapping mapping with 2 source parameters, for eg:
If we are mapping some
Integersource field fromRequestBeantoAudienceProfileRequestthen the condition is applied onslotIdwhich is not expected. Following is the snippet of the generated code:Steps to reproduce the problem
https://github.com/altaiezior/mapstruct-issues/tree/master/issue-4037
MapStruct Version
MapStruct 1.5.5