SpotBugs reports a high-prio warning in entity classes that have been enhanced with ByteBuddy enhancement:
EC: Using pointer equality to compare different types (EC_UNRELATED_TYPES_USING_POINTER_EQUALITY)This method uses pointer equality to compare two references that seem to be of different types. The result of this comparison will always be false at runtime.
The faulty code is in the generated many-to-many handler functions. Here's the relevant part of org.hibernate.bytecode.enhance.internal.bytebuddy.CodeTemplates
I believe that the intended conditions in the if-statement in line 21 should have been:
The bug has been around at least since 5.3.27, probably even eralier, and is still there in the current version. |