junit/0001-Port-to-hamcrest-2.1.patch
2020-03-06 14:49:34 +01:00

40 lines
1.7 KiB
Diff

From 41302698f39a6bda58e634a786ce2a6c290eadba Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Fri, 6 Mar 2020 14:28:05 +0100
Subject: [PATCH] Port to hamcrest 2.1
---
src/main/java/org/junit/matchers/JUnitMatchers.java | 2 +-
.../tests/experimental/theories/runner/WithDataPointMethod.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/junit/matchers/JUnitMatchers.java b/src/main/java/org/junit/matchers/JUnitMatchers.java
index 13407cc..8889266 100644
--- a/src/main/java/org/junit/matchers/JUnitMatchers.java
+++ b/src/main/java/org/junit/matchers/JUnitMatchers.java
@@ -56,7 +56,7 @@ public class JUnitMatchers {
* @deprecated Please use {@link CoreMatchers#everyItem(Matcher)} instead.
*/
@Deprecated
- public static <T> Matcher<Iterable<T>> everyItem(final Matcher<T> elementMatcher) {
+ public static <T> Matcher<Iterable<? extends T>> everyItem(final Matcher<T> elementMatcher) {
return CoreMatchers.everyItem(elementMatcher);
}
diff --git a/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java b/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
index f2b2753..e5759ed 100644
--- a/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
+++ b/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
@@ -108,7 +108,7 @@ public class WithDataPointMethod {
return JUnitCore.runClasses(type).getFailures();
}
- private Matcher<Iterable<Failure>> empty() {
+ private Matcher<Iterable<? extends Failure>> empty() {
return everyItem(nullValue(Failure.class));
}
}
--
2.24.1