From ca96496cff1b2beb2911652a99aeda163791ef23 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Tue, 7 Mar 2017 13:28:01 +0100 Subject: [PATCH] fixed files form Mockito #24 --- .../internal/stubbing/defaultanswers/ReturnsEmptyValues.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/Mockito/24/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValues.java b/projects/Mockito/24/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValues.java index 4c00f50..d19fcda 100644 --- a/projects/Mockito/24/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValues.java +++ b/projects/Mockito/24/org/mockito/internal/stubbing/defaultanswers/ReturnsEmptyValues.java @@ -73,7 +73,7 @@ public Object answer(InvocationOnMock invocation) { //see issue 184. //mocks by default should return 0 if references are the same, otherwise some other value because they are not the same. Hence we return 1 (anything but 0 is good). //Only for compareTo() method by the Comparable interface - return 1; + return invocation.getMock() == invocation.getArguments()[0] ? 0 : 1; } Class returnType = invocation.getMethod().getReturnType();