-
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
Fix the non-default constructor mechanism of bytecode recording #31183
Fix the non-default constructor mechanism of bytecode recording #31183
Conversation
gastaldi
commented
Feb 15, 2023
- Fix the non-default constructor mechanism of bytecode recording
- Fixes Bug in Quarkus bytecode generation #31153
- Optimize bytecode recording test performance
I didn't do anything, you guys did all the work :) |
@geoand well, you approved this PR, so that's something 😉 |
LGTM, obviously :-) It would be nice if @stuartwdouglas could also take a look! |
This comment has been minimized.
This comment has been minimized.
Bytecode recorders attempt to match constructor parameters to properties and skip setting properties that were initialized by the constructor. The assumption is that if the constructor has a parameter with the same name as the property, the property is set by the constructor. Otherwise it needs to be set using a setter. This matching was not implemented for the non-default constructor mechanism. This commit fixes that.
81e7cf1
to
106eb4f
Compare
Fix the test case for quarkusio#31153
- Change creation of a large collection in `BytecodeRecorderTestCase.java` from using a loop to using `Collections.nCopies`
106eb4f
to
4486712
Compare
@Ladicek looks like ArC didn't like that change:
|
core/deployment/src/main/java/io/quarkus/deployment/recording/BytecodeRecorderImpl.java
Outdated
Show resolved
Hide resolved
Bytecode recorders attempt to match properties to constructor parameters by the property/parameter name. However, parameters do not always have to have their names available. This commit fixes the bytecode recorder matching mechanism to avoid parameters that do not have an available name.
Failing Jobs - Building 8a65238
Full information is available in the Build summary check run. Failures⚙️ MicroProfile TCKs Tests #- Failing: tcks/microprofile-lra
📦 tcks/microprofile-lra✖
✖
✖
✖
✖
✖
|
Test failures are unrelated and happen in current |
If we want it backported, we will need specific PRs. It doesn't apply cleanly and I prefer having the author fix the conflicts given it's a sensitive matter. |
I'll refrain from backporting this to 2.13 because it involves changes that would require a deeper analysis (like the introduction of UPDATE: actually, I think that's quite trivial, let me check |