-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Allow recording of immutable objects #10736
Conversation
@RecordableConstructor can now be used to instruct the recoder to use a given constructor to create immutable objects. Also document the types that can be recorded. Fixes quarkusio#10150
@geoand care to have a look to that one? |
Yup, I'll take a look tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I just added one question
@@ -454,6 +454,12 @@ | |||
<artifactId>maven-resources-plugin</artifactId> | |||
<version>3.1.0</version> | |||
</plugin> | |||
<plugin> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this needed for some reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, so the way the immutable object recording works is that it maps field names to constructor parameter names. To actually record these names you need to use the -parameters javac option. Otherwise you would need annotations to specify the parameter names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I was just wondering about the placement of this configuration (I did the review in the IDE and it seemed to not have updated the comment), not the functionality itself.
@RecordableConstructor can now be used to instruct the recoder
to use a given constructor to create immutable objects.
Also document the types that can be recorded.
Fixes #10150