-
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
ArC: prevent removing the final flag from records #33882
ArC: prevent removing the final flag from records #33882
Conversation
I would have added a test, but I don't think we have a good place for that. We could add |
This comment has been minimized.
This comment has been minimized.
I'll try adding the |
Record classes must always be `final`, even the `Class.isRecord()` method checks that. Therefore, the bytecode transformation that removes the `final` flag from a class is invalid for records. With this commit, ArC will no longer blindly remove the `final` flag from records; a deployment problem occurs instead. This means that records cannot be used to define normal scoped beans and cannot be intercepted or decorated.
d3179dc
to
540b809
Compare
Done, tests are in the 2nd commit. |
This comment has been minimized.
This comment has been minimized.
Failing Jobs - Building 540b809
Full information is available in the Build summary check run. Failures⚙️ JVM Tests - JDK 19 #- Failing: extensions/amazon-lambda/deployment
! Skipped: extensions/amazon-lambda-http/deployment extensions/amazon-lambda-rest/deployment integration-tests/amazon-lambda and 6 more 📦 extensions/amazon-lambda/deployment✖
|
|
Record classes must always be
final
, even theClass.isRecord()
method checks that. Therefore, the bytecode transformation that removes thefinal
flag from a class is invalid for records.With this commit, ArC will no longer blindly remove the
final
flag from records; a deployment problem occurs instead. This means that records cannot be used to define normal scoped beans and cannot be intercepted or decorated.Fixes #33810