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

Do not transform invokespecial instructions produced for direct instantiations. #2680

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

copybara-service[bot]
Copy link

Do not transform invokespecial instructions produced for direct instantiations.

The instruction invokespecial is also used to invoke constructors and perform object instantiation. This CL fixes Hilt's transform to not change the owner of such instructions even if the owner is the older superclass since they are instantiating an object that happens to be the of the same type as the 'old' superclass.

Fixes #2662

RELNOTES=Fix an issue in Hilt's bytecode transform that would cause classes to fail validation if they contained an instantiation of an object whose type is the same as the superclass of the @androidentrypoint annotated class.

@google-cla google-cla bot added the cla: yes label Jun 9, 2021
@copybara-service copybara-service bot force-pushed the test_378309129 branch 2 times, most recently from dcef589 to e6e3b01 Compare June 9, 2021 21:11
…ntiations.

The instruction invokespecial is also used to invoke constructors and perform object instantiation. This CL fixes Hilt's transform to not change the owner of such instructions even if the owner is the older superclass since they are instantiating an object that happens to be the of the same type as the 'old' superclass.

Fixes #2662

RELNOTES=Fix an issue in Hilt's bytecode transform that would cause classes to fail validation if they contained an instantiation of an object whose type is the same as the superclass of the @androidentrypoint annotated class.
PiperOrigin-RevId: 378500741
@copybara-service copybara-service bot merged commit 839a849 into master Jun 9, 2021
@copybara-service copybara-service bot deleted the test_378309129 branch June 9, 2021 21:34
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.

Hilt: java.lang.VerifyError: Verifier rejected class on views that use @AndroidEntryPoint
1 participant