File tree Expand file tree Collapse file tree
hamcrest-library/src/main/java/org/hamcrest/collection Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,11 +47,12 @@ public static <E> Matcher<Collection<? extends E>> empty() {
4747 * For example:
4848 * <pre>assertThat(new ArrayList<String>(), is(emptyCollectionOf(String.class)))</pre>
4949 *
50- * @param type
50+ * @param unusedToForceReturnType
5151 * the type of the collection's content
5252 */
53+ @ SuppressWarnings ({"unchecked" , "UnusedParameters" })
5354 @ Factory
54- public static <E > Matcher <Collection <E >> emptyCollectionOf (Class <E > type ) {
55+ public static <E > Matcher <Collection <E >> emptyCollectionOf (Class <E > unusedToForceReturnType ) {
5556 return (Matcher )empty ();
5657 }
5758}
Original file line number Diff line number Diff line change @@ -42,13 +42,12 @@ public static <E> Matcher<Iterable<? extends E>> emptyIterable() {
4242 * For example:
4343 * <pre>assertThat(new ArrayList<String>(), is(emptyIterableOf(String.class)))</pre>
4444 *
45- * @param type
45+ * @param unusedToForceReturnType
4646 * the type of the iterable's content
4747 */
48+ @ SuppressWarnings ({"unchecked" , "UnusedParameters" })
4849 @ Factory
49- public static <E > Matcher <Iterable <E >> emptyIterableOf (Class <E > type ) {
50- @ SuppressWarnings ({ "rawtypes" , "unchecked" })
51- final Matcher <Iterable <E >> result = (Matcher )emptyIterable ();
52- return result ;
50+ public static <E > Matcher <Iterable <E >> emptyIterableOf (Class <E > unusedToForceReturnType ) {
51+ return (Matcher )emptyIterable ();
5352 }
5453}
You can’t perform that action at this time.
0 commit comments