Browse Source

Fixing squid:S1201 Methods named "equals" should override Object.equals(Object)

master
Faisal Hameed 10 years ago
committed by faisal-hameed
parent
commit
d841c9851e
  1. 4
      src/main/java/com/corundumstudio/socketio/annotation/ScannerEngine.java

4
src/main/java/com/corundumstudio/socketio/annotation/ScannerEngine.java

@ -36,7 +36,7 @@ public class ScannerEngine {
private Method findSimilarMethod(Class<?> objectClazz, Method method) { private Method findSimilarMethod(Class<?> objectClazz, Method method) {
Method[] methods = objectClazz.getDeclaredMethods(); Method[] methods = objectClazz.getDeclaredMethods();
for (Method m : methods) { for (Method m : methods) {
if (equals(m, method)) {
if (isEquals(m, method)) {
return m; return m;
} }
} }
@ -86,7 +86,7 @@ public class ScannerEngine {
} }
private boolean equals(Method method1, Method method2) {
private boolean isEquals(Method method1, Method method2) {
if (!method1.getName().equals(method2.getName()) if (!method1.getName().equals(method2.getName())
|| !method1.getReturnType().equals(method2.getReturnType())) { || !method1.getReturnType().equals(method2.getReturnType())) {
return false; return false;

Loading…
Cancel
Save