From 487e8ea71b66d253aa364389bda0bc953ebfa3ba Mon Sep 17 00:00:00 2001 From: tdurieux Date: Tue, 7 Mar 2017 13:27:40 +0100 Subject: [PATCH] fixed files form Mockito #11 --- .../mockito/internal/creation/DelegatingMethod.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/projects/Mockito/11/org/mockito/internal/creation/DelegatingMethod.java b/projects/Mockito/11/org/mockito/internal/creation/DelegatingMethod.java index 349719b..034694f 100644 --- a/projects/Mockito/11/org/mockito/internal/creation/DelegatingMethod.java +++ b/projects/Mockito/11/org/mockito/internal/creation/DelegatingMethod.java @@ -52,11 +52,19 @@ public boolean isAbstract() { */ @Override public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o instanceof DelegatingMethod) { + DelegatingMethod that = (DelegatingMethod) o; + return method.equals(that.method); + } else { return method.equals(o); + } } @Override public int hashCode() { - return 1; + return method.hashCode(); } } \ No newline at end of file