Calling setter methods even though values are equal
25 views
Skip to first unread message
DImuthu Upeksha
unread,
Dec 4, 2019, 5:18:55 PM12/4/19
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Dozer Mapper
Hi,
We are doing some POJO to Thrift Stub conversion using the dozer mapper and there is an integer field in both objects with same name and value = 0. For that property, in some cases line [1] becomes true due to the Autoboxing cache in JVM [2] as getPropertyValue(bean) is getting the same object as "value" from cache. Because of that, in some cases it calls setter method of target property and sometimes it doesn't. However we are doing more stuff in the setter method in target property, we need to call that method always irrespective of the value. Do you think that this is a bug in the code or is there a workaround to make setters invoked always?