Skip to content

Commit

Permalink
fixed files form Mockito #35
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent fb82d04 commit a9980f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions projects/Mockito/35/org/mockito/Matchers.java
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ public static <T> Collection<T> anyCollectionOf(Class<T> clazz) {
* @return <code>null</code>.
*/
public static <T> T isA(Class<T> clazz) {
return reportMatcher(new InstanceOf(clazz)).<T>returnNull();
return reportMatcher(new InstanceOf(clazz)).<T>returnFor(clazz);
}

/**
Expand Down Expand Up @@ -476,7 +476,7 @@ public static short eq(short value) {
* @return <code>null</code>.
*/
public static <T> T eq(T value) {
return reportMatcher(new Equals(value)).<T>returnNull();
return (T) reportMatcher(new Equals(value)).<T>returnFor((Class) value.getClass());
}

/**
Expand Down Expand Up @@ -513,7 +513,7 @@ public static <T> T refEq(T value, String... excludeFields) {
* @return <code>null</code>.
*/
public static <T> T same(T value) {
return reportMatcher(new Same(value)).<T>returnNull();
return (T) reportMatcher(new Same(value)).<T>returnFor((Class) value.getClass());
}

/**
Expand Down

0 comments on commit a9980f3

Please sign in to comment.