sulky
sulky copied to clipboard
fix equals using getClass() instead of instanceof.
Probably unwanted getClass() in the equals method. getClass() should only be used for proxiable objects, like JPA’s entity classes (e.g. implemented by hibernate, eclipselink, etc).
Every other class should not add fields and thus must comply to the java spec which forbids mutation by adding fields. Thus, the subclass must comply to using equals with the instanceof keyword.