From 0a18460234c307f28fac06cac5d513eca0c5833d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Tue, 25 Aug 2020 14:37:29 +0200 Subject: [PATCH] Update pmd-java/src/main/resources/category/java/errorprone.xml --- pmd-java/src/main/resources/category/java/errorprone.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-java/src/main/resources/category/java/errorprone.xml b/pmd-java/src/main/resources/category/java/errorprone.xml index e2983797e7..bdc9cc92c7 100644 --- a/pmd-java/src/main/resources/category/java/errorprone.xml +++ b/pmd-java/src/main/resources/category/java/errorprone.xml @@ -3054,7 +3054,7 @@ StringBuilder sb4 = new StringBuilder("c"); 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 main, +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.