enum (1.5) equality ?
Hi,
When using == to compare enum values, intellij marks a warning :
"Object values are compared using '==', not '.equals()'".
Now is this correct, should I really use equals to compare enum values?
Thanks !
BoD
Please sign in to leave a comment.
This is a known issue, and will be fixed in the next release, by providing a flag as to whether == between enums should receive a warning. Since there are differences between .equals() and == for enums (tricky classloader issues, mostly), I will be making the check optional.
--Dave Griffith