Menu

#567 Warning on override Hashtable / HashMap put method with super call

PMD-5.1.x
open
nobody
None
5
2012-11-15
2012-11-15
Nick Radov
No

http://norvig.com/java-iaq.html#super

Overriding the Hashtable.put(Object, Object) or HashMap.put(Object, Object) method and calling super is likely to lead to unexpected results and intermittent failures when the internal table overflows. We should add a new rule which matches code like in Peter Norvig's example linked above.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.