Expected behavior
We may have getters with complex logic within, so we would want that getter to be computed only once but it can be computed twice, one for checking the nullability and other time for assigning the value. We may want to store the getter value in a variable, check for nullability and then assign the value.
Actual behavior
We should store the values from the getter methods in a variable and use the same variable for checking null and assiging the value
Steps to reproduce the problem
https://github.com/altaiezior/mapstruct-issues/tree/master/issue-4030
MapStruct Version
1.6.3
Expected behavior
We may have getters with complex logic within, so we would want that getter to be computed only once but it can be computed twice, one for checking the nullability and other time for assigning the value. We may want to store the getter value in a variable, check for nullability and then assign the value.
Actual behavior
We should store the values from the getter methods in a variable and use the same variable for checking null and assiging the value
Steps to reproduce the problem
https://github.com/altaiezior/mapstruct-issues/tree/master/issue-4030
MapStruct Version
1.6.3