Here's a REALLY stupid one. First off the implementation of SelfDirtinessTracker is horribly broken and never works. But that's okay because DefaultFlushEntityEventListener will just ignore it! But there's a missing piece: why does EntityEntry.requiresDirtyCheck return true? Given that SelfDirtinessTracker indicates the entity is clean, why is a dirty check happening?
It's because EntityEntry.isUnequivocallyNonDirty handles SelfDirtinessTracker wrong and returns the negation of the correct value if the entity implements SelfDirtinessTracker! I guess it's a good thing that SelfDirtinessTracker is broken and never indicates dirtiness!
The test case is "open up IntelliJ and observe that the code is broken".
|