aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2016-04-29 22:05:38 -0700
committerIan Rogers <irogers@google.com>2016-04-29 22:05:38 -0700
commit31c5e671fe8499a8ef68f692f93b5093e44b0250 (patch)
treea83570202c27bef31f026c416070a87c8746893b
parentf31b2fcfcfba4a5c6d13a4a2147567c08c72b034 (diff)
downloadhamcrest-31c5e671fe8499a8ef68f692f93b5093e44b0250.tar.gz
Extra generic type information to aid certain javacs.
In particular this is needed for the code to compile using the error prone analyzer. Bug: 27723540 Change-Id: Ibfcef50dec0291f51a4372e18da40e859ac3e2e1
-rw-r--r--library/src/org/hamcrest/Matchers.java8
-rw-r--r--src/org/hamcrest/CoreMatchers.java4
2 files changed, 6 insertions, 6 deletions
diff --git a/library/src/org/hamcrest/Matchers.java b/library/src/org/hamcrest/Matchers.java
index b78864a..ce550b5 100644
--- a/library/src/org/hamcrest/Matchers.java
+++ b/library/src/org/hamcrest/Matchers.java
@@ -70,7 +70,7 @@ public class Matchers {
* Evaluates to true only if ALL of the passed in matchers evaluate to true.
*/
public static <T> org.hamcrest.Matcher<T> allOf(org.hamcrest.Matcher<? extends T>... matchers) {
- return org.hamcrest.core.AllOf.allOf(matchers);
+ return org.hamcrest.core.AllOf.<T>allOf(matchers);
}
/**
@@ -84,7 +84,7 @@ public class Matchers {
* Evaluates to true if ANY of the passed in matchers evaluate to true.
*/
public static <T> org.hamcrest.Matcher<T> anyOf(org.hamcrest.Matcher<? extends T>... matchers) {
- return org.hamcrest.core.AnyOf.anyOf(matchers);
+ return org.hamcrest.core.AnyOf.<T>anyOf(matchers);
}
/**
@@ -175,11 +175,11 @@ public class Matchers {
}
public static <T> org.hamcrest.Matcher<java.lang.Iterable<T>> hasItem(org.hamcrest.Matcher<? extends T> elementMatcher) {
- return org.hamcrest.collection.IsCollectionContaining.hasItem(elementMatcher);
+ return org.hamcrest.collection.IsCollectionContaining.<T>hasItem(elementMatcher);
}
public static <T> org.hamcrest.Matcher<java.lang.Iterable<T>> hasItems(org.hamcrest.Matcher<? extends T>... elementMatchers) {
- return org.hamcrest.collection.IsCollectionContaining.hasItems(elementMatchers);
+ return org.hamcrest.collection.IsCollectionContaining.<T>hasItems(elementMatchers);
}
public static <T> org.hamcrest.Matcher<java.lang.Iterable<T>> hasItems(T... elements) {
diff --git a/src/org/hamcrest/CoreMatchers.java b/src/org/hamcrest/CoreMatchers.java
index fac3acf..dd36acb 100644
--- a/src/org/hamcrest/CoreMatchers.java
+++ b/src/org/hamcrest/CoreMatchers.java
@@ -70,7 +70,7 @@ public class CoreMatchers {
* Evaluates to true only if ALL of the passed in matchers evaluate to true.
*/
public static <T> org.hamcrest.Matcher<T> allOf(org.hamcrest.Matcher<? extends T>... matchers) {
- return org.hamcrest.core.AllOf.allOf(matchers);
+ return org.hamcrest.core.AllOf.<T>allOf(matchers);
}
/**
@@ -84,7 +84,7 @@ public class CoreMatchers {
* Evaluates to true if ANY of the passed in matchers evaluate to true.
*/
public static <T> org.hamcrest.Matcher<T> anyOf(org.hamcrest.Matcher<? extends T>... matchers) {
- return org.hamcrest.core.AnyOf.anyOf(matchers);
+ return org.hamcrest.core.AnyOf.<T>anyOf(matchers);
}
/**