[hibernate-dev] Property using field access and has final getter/setter method
Gail Badner
gbadner at redhat.com
Fri Mar 6 20:50:10 EST 2020
Here's the PR:
https://github.com/hibernate/hibernate-orm/pull/3286
On Thu, Mar 5, 2020 at 10:21 PM Gail Badner <gbadner at redhat.com> wrote:
> I created https://hibernate.atlassian.net/browse/HHH-13891.
>
> IIUC, a ProxyFactory should not be created if any ID, version, or property
> method getter/setter is final.
>
> I'm working on a PR.
>
> Thanks,
> Gail
>
>
> On Thu, Mar 5, 2020 at 7:56 AM Steve Ebersole <steve at hibernate.org> wrote:
>
>> If any getters or setters are final then the ProxyFactory cannot be used
>> and imo should not get built, especially moving forward as we could use
>> bytecode-based proxies
>>
>> On Wed, Mar 4, 2020 at 2:11 PM Gail Badner <gbadner at redhat.com> wrote:
>>
>>> This commit [1] for HHH-11838 [2] causes an error to get logged by
>>> ProxyFactoryHelper#validateProxyability [3] for a property that uses
>>> field
>>> access and has a corresponding final getter/setter method.
>>>
>>> The logged error does not cause any failure, and the
>>> ByteBuddyProxyFactory
>>> gets built.
>>>
>>> Should this error be logged in this case?
>>>
>>> When the error message is valid, should ByteBuddyProxyFactory not get
>>> built?
>>>
>>> Thanks,
>>> Gail
>>>
>>> [1]
>>>
>>> https://github.com/hibernate/hibernate-orm/commit/f8b78bcad0df43bd9b69fa5ee9d3bf10a3202318
>>> [2] https://hibernate.atlassian.net/browse/HHH-11838
>>> [3]
>>>
>>> https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/proxy/pojo/ProxyFactoryHelper.java#L87-L94
>>> _______________________________________________
>>> hibernate-dev mailing list
>>> hibernate-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>
>>>
More information about the hibernate-dev
mailing list