You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Create any class with a field of an enum with one element.
2. Run EqualsVerifier on this class:
AssertionError: "java.lang.AssertionError: Enum DeleteReason only has 1
element(s).", thrown at PrefabValues.putEnumInstances
But: a enum field may be null or be the one enum value. Imo this is unusual but
no reason to fail equals-validation.
Original issue reported on code.google.com by [email protected] on 6 Feb 2013 at 3:34
The text was updated successfully, but these errors were encountered:
You're right, EqualsVerifier fails on classes with a single-element enum field,
even if this field isn't used anywhere in the equals or hashCode methods. Since
single-element enums are the recommended way to create singletons, this isn't
even that unusual a scenario.
I'll try to think of something for the next release. Thanks for reporting this!
Original issue reported on code.google.com by
[email protected]
on 6 Feb 2013 at 3:34The text was updated successfully, but these errors were encountered: