BytecodeEnhancements PersistentAttributesEnhancer bytecode error INVOKESPECIAL

Description

In class org.hibernate.bytecode.enhance.internal.PersistentAttributesEnhancer in method
enhanceAttributesAccess the Opcode used INVOKESPECIAL is not correct (itr.writeByte( Opcode.INVOKESPECIAL, index )winking face instead we can use the correct opcode INVOKEVIRTUAL.
With this change the bytecode generated can be used in android and if you decompile the geenrated class will get the right code. (With INVOKESPECIAL the decompiled code points to super. that is not corretct otherwise with INVOKEVIRTUAL th code points to this.)

Activity

Show:

Former user June 10, 2016 at 11:21 PM

Fixed in 5.1 and 5.0 branches as well. Thanks Luis!

Steve Ebersole June 9, 2016 at 4:08 PM

, this is all resolved in regards to 5.2. Please resolve/close after you apply to 5.0/5.1. Thanks

Steve Ebersole June 9, 2016 at 4:06 PM

I have applied this upstream to master. Thanks!

Davide Malpassini March 28, 2016 at 6:07 PM

Thank you very much.
Il 28/Mar/2016 16:40, "Luis Barreiro (JIRA)" <jira@hibernate.atlassian.net>

Luis Barreiro March 28, 2016 at 2:39 PM

In the early days the enhanced getter/setter methods were private, but then some of the added features required them to be public. The INVOKESPECIAL bytecode was never changed to account for that.

Fixed

Details

Assignee

Reporter

Labels

Fix versions

Affects versions

Priority

Created March 24, 2016 at 2:22 PM
Updated June 30, 2016 at 4:22 PM
Resolved June 10, 2016 at 11:21 PM