-
-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception thrown when mapping from nested Record field #3719
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
In MapStruct 1.6.0, it used to be possible to map from a nested Record, but this results in an exception in version 1.6.1.
Actual behavior
No code is generated by MapStruct; a ClassCastException is thrown:
Steps to reproduce the problem
I am using Temurin JDK 21.0.4.7-hotspot
Consider the following mapper:
Note that this is a mapper to illustrate the problem. In our project we use a mapper that take another input parameter (a String) and maps that directly onto the target object (POJO), so I hope that explains why I would define a seperate mapper for the nested record.
MapStruct Version
MapStruct 1.6.1
The text was updated successfully, but these errors were encountered: