Closed chris922 closed 8 years ago
Isn't it a duplicate for #67 which is already fixed? Could you please test the latest snapshot version?
Or could you PR the smallest possible project which reproduces this behaviour?
Actually DefaultHashCodeStrategy.java:155
should no longer be called anyway, 297
should.
It's working with the latest snapshot! Before I opened this issue I already used the latest snapshot to test.. but only for generating and not the snapshot runtime library. Sorry for that.
Released.
I tried to get the
HashCode
plugin working (not theSimpleHashCode
) and noticed, that changing aboolean
(notBoolean
) value doesn't lead to a new hashCode. After taking a look into the generated sourcecode I found out, that forboolean
(probably all primitives) the generated code sets thevalueSet
argument always totrue
. Looking into the runtime libraries I saw thatvalueSet == true
means, that the original value isn't considered when calculating the hashCode.I rolled back to 0.10.0 and tested it again -> hashCode is working. So there might be a problem through this new
valueSet
attribute.I assume that either this part might be wrong:
HashCodePlugin.java:216
Or the handling of the
valueSet
attribute inDefaultHashCodeStrategy.java:155
Mistakenly I looked yesterday in the
SimpleHashCode
class and thevalueSet
attribute is calculated there differently. (SimpleHashCodePlugin.java:108
) I already added a note there, the code there might be false, too.If you need more information just ask :smiley: