My team is using Hibernate Tools 4.0.0 on the current project, and I am using FindBugs. It's flagging that the generated ORM code's equals
method is using ==
instead of equals
.
I searched but couldn't find how to change that. From my understanding, shouldn't equals
be used instead of ==
? If so, how to do it (via hibernate.reveng.xml
or something else)?
Update:
I needed to scroll right to see the rest of the line of code generated. Turns out, the first part that was flagged is doing a memory reference. However, it 's OR'd with a comparison using equals
. So this is simply a case of needing to read more carefully.