TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
TIOBE - Java Coding Standard
Search

Rule:  Naming12Checked automatically with code checker

Synopsis:The method name and parameter number are suspiciously close to equals(Object)
Language:Java
Severity Level:2
Category:Naming


Description:
The method name and parameter number are suspiciously close to equals(Object), which may mean you are intending to override the equals(Object) method.
public class Foo {
 public int equals(Object o) {
 // oops, this probably was supposed to be boolean equals
 }
 public boolean equals(String s) {
 // oops, this probably was supposed to be equals(Object)
 }
}