Add md formatting

This commit is contained in:
Clément Fournier
2020-08-25 14:38:59 +02:00
parent d7df3d342b
commit 36c3d87272

View File

@ -3052,11 +3052,11 @@ StringBuilder sb4 = new StringBuilder("c");
class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_java_errorprone.html#suspiciousequalsmethodname">
<description>
The method name and parameter number are suspiciously close to Object.equals, which can denote an
intention to override it. However, the method does not override Object.equals, but overloads it instead.
Overloading Object.equals method is confusing for other programmers, error-prone and hard to maintain,
especially when using inheritance, because @Override annotations used in subclasses can provide a false
sense of security. For more information on Object.equals method, see Effective Java, 3rd Edition,
The method name and parameter number are suspiciously close to `Object.equals`, which can denote an
intention to override it. However, the method does not override `Object.equals`, but overloads it instead.
Overloading `Object.equals` method is confusing for other programmers, error-prone and hard to maintain,
especially when using inheritance, because `@Override` annotations used in subclasses can provide a false
sense of security. For more information on `Object.equals` method, see Effective Java, 3rd Edition,
Item 10: Obey the general contract when overriding equals.
</description>
<priority>2</priority>