OpenLiberty/guide-jpa-intro

Event overrides equals but not hashCode

Closed this issue · 0 comments

The Event class overrides equals() but does not override hashCode()

Although in this guide we're probably not hashing the Event, overriding equals() like this without also overriding hashCode() violates the contract of hashCode and is very bad practise.