Skip to content

Commit 7b0aa98

Browse files
tumbarumbanhojpatrickpeterdemaeyer
authored
Java 1.8 (#411)
* #331 Bumped source and target compatibility to Java 1.8 * hamcrest v3.0-SNAPSHOT * JUnit v5.8.2 * No longer using Travis Co-authored-by: John Patrick <[email protected]> Co-authored-by: Peter De Maeyer <[email protected]>
1 parent 25bed14 commit 7b0aa98

13 files changed

+31
-40
lines changed

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

BUILDING.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
--[ Build requirements ]-------------------------------------
66

7-
* JDK 1.7
7+
* JDK 1.8
88

99
--[ Building from the command line ]-------------------------
1010

CHANGES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Hamcrest Changes
22

3+
## Version 3.0 (Unreleased)
4+
5+
### Improvements
6+
7+
* Java 1.8 or newer ([Issue #331](https://github.com/hamcrest/JavaHamcrest/issues/331)).
8+
9+
TBD
10+
11+
### Bugfixes
12+
13+
TBD
14+
315
## Version 2.3 (Unreleased)
416

517
### Improvements

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ apply plugin: 'osgi'
33
apply plugin: 'maven-publish'
44

55
group = "org.hamcrest"
6-
version = "2.3-SNAPSHOT"
6+
version = "3.0-SNAPSHOT"
77

88
subprojects {
99
apply plugin: 'checkstyle'
1010
apply plugin: 'java-library'
1111

12-
sourceCompatibility = JavaVersion.VERSION_1_7
13-
targetCompatibility = JavaVersion.VERSION_1_7
12+
sourceCompatibility = JavaVersion.VERSION_1_8
13+
targetCompatibility = JavaVersion.VERSION_1_8
1414

1515
group = rootProject.group
1616
version = rootProject.version

hamcrest/hamcrest.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ apply plugin: 'osgi'
33
version = rootProject.version
44

55
dependencies {
6-
testImplementation(group: 'junit', name: 'junit', version: '4.13.2') {
7-
transitive = false
6+
testImplementation(group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2') {
7+
transitive = true
8+
}
9+
testImplementation(group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.8.2') {
10+
transitive = true
11+
exclude(module: 'hamcrest-core')
812
}
913
}
1014

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)