History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-24171
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Bas Leijdekkers
Reporter: Bas Leijdekkers
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Stale equals and hashcode method inspection

Created: 09 Jan 08 15:57   Updated: 09 Jan 08 16:11
Component/s: Code Analysis. Duplicates
Fix Version/s: Diana Final

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 8,088
Severity: Medium


 Description  « Hide
David says on http://plugins.intellij.net/wishlist/item/?wid=165 :
Equals and hashCode often never get updated when a class grows. So when a new field is added the equals and hashCode become invalid. Perhaps this is intended, perhaps not! Why not add a check to see if all class fields participate in the equals and hashCode - this would catch stale versions of these methods.

 All   Comments   Work Log   Change History      Sort Order:
Sascha Weinreuter - 09 Jan 08 16:05
This should include a mechanism to explicitly exclude certain fields from that check. Maybe something like @NotEqualityRelevant...