Skip to content
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

Merged
merged 1 commit into from
Jul 28, 2020
Merged

Conversation

stuartwdouglas
Copy link
Member

@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

@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
@gsmet
Copy link
Member

gsmet commented Jul 27, 2020

@geoand care to have a look to that one?

@gsmet gsmet added this to the 1.7.0 - master milestone Jul 27, 2020
@geoand
Copy link
Contributor

geoand commented Jul 27, 2020

Yup, I'll take a look tomorrow

Copy link
Contributor

@geoand geoand left a 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>
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

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.

@gsmet gsmet merged commit f650dc1 into quarkusio:master Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document allowed parameter types for bytecode recording
3 participants