Skip to content

Commit a42245d

Browse files
peterdemaeyernhojpatrick
authored andcommitted
hamcrest#331 Bumped source and target compatibility to Java 1.8
1 parent 044c832 commit a42245d

8 files changed

+9
-9
lines changed

hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static <T> Matcher<T[]> hasItemInArray(T element) {
7575
*/
7676
@SafeVarargs
7777
public static <E> Matcher<E[]> arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers) {
78-
return arrayContainingInAnyOrder(asList(itemMatchers));
78+
return arrayContainingInAnyOrder((Collection) asList(itemMatchers));
7979
}
8080

8181
/**

hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public void describeTo(Description description) {
6262
* @return The matcher.
6363
*/
6464
public static <E> Matcher<E[]> arrayContainingInAnyOrder(Matcher<? super E>... itemMatchers) {
65-
return arrayContainingInAnyOrder(Arrays.asList(itemMatchers));
65+
return arrayContainingInAnyOrder((Collection) Arrays.asList(itemMatchers));
6666
}
6767

6868
/**

hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public static <E> Matcher<E[]> arrayContaining(E... items) {
7878
* @return The matcher.
7979
*/
8080
public static <E> Matcher<E[]> arrayContaining(Matcher<? super E>... itemMatchers) {
81-
return arrayContaining(asList(itemMatchers));
81+
return arrayContaining((List) asList(itemMatchers));
8282
}
8383

8484
/**

hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private boolean isMatched(S item) {
102102
*/
103103
@SafeVarargs
104104
public static <T> Matcher<Iterable<? extends T>> containsInAnyOrder(Matcher<? super T>... itemMatchers) {
105-
return containsInAnyOrder(Arrays.asList(itemMatchers));
105+
return containsInAnyOrder((Collection) Arrays.asList(itemMatchers));
106106
}
107107

108108
/**

hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public static <E> Matcher<Iterable<? extends E>> containsInRelativeOrder(E... it
105105
*/
106106
@SafeVarargs
107107
public static <E> Matcher<Iterable<? extends E>> containsInRelativeOrder(Matcher<? super E>... itemMatchers) {
108-
return containsInRelativeOrder(asList(itemMatchers));
108+
return containsInRelativeOrder((List) asList(itemMatchers));
109109
}
110110

111111
/**

hamcrest/src/main/java/org/hamcrest/core/AllOf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static <T> Matcher<T> allOf(Iterable<Matcher<? super T>> matchers) {
6868
*/
6969
@SafeVarargs
7070
public static <T> Matcher<T> allOf(Matcher<? super T>... matchers) {
71-
return allOf(Arrays.asList(matchers));
71+
return allOf((Iterable) Arrays.asList(matchers));
7272
}
7373

7474
}

hamcrest/src/main/java/org/hamcrest/core/AnyOf.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public static <T> AnyOf<T> anyOf(Iterable<Matcher<? super T>> matchers) {
5858
*/
5959
@SafeVarargs
6060
public static <T> AnyOf<T> anyOf(Matcher<? super T>... matchers) {
61-
return anyOf(Arrays.asList(matchers));
61+
return anyOf((Iterable) Arrays.asList(matchers));
6262
}
6363

6464
}

hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public CombinableBothMatcher(Matcher<? super X> matcher) {
6969
this.first = matcher;
7070
}
7171
public CombinableMatcher<X> and(Matcher<? super X> other) {
72-
return new CombinableMatcher<>(first).and(other);
72+
return new CombinableMatcher(first).and(other);
7373
}
7474
}
7575

@@ -94,7 +94,7 @@ public CombinableEitherMatcher(Matcher<? super X> matcher) {
9494
this.first = matcher;
9595
}
9696
public CombinableMatcher<X> or(Matcher<? super X> other) {
97-
return new CombinableMatcher<>(first).or(other);
97+
return new CombinableMatcher(first).or(other);
9898
}
9999
}
100100

0 commit comments

Comments
 (0)