Skip to content

Commit 129abec

Browse files
authored
Makes the lib build and tests pass on JDK 11 (#1295)
1 parent 9a2d4e9 commit 129abec

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/test/groovy/graphql/execution/ExecutorServiceExecutionStrategyTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import java.util.concurrent.TimeUnit
1212
@Deprecated
1313
class ExecutorServiceExecutionStrategyTest extends Specification {
1414

15-
def 'Example usage of ExecutorServiceExecutionStrategy.'() {
15+
def 'Example usage of ExecutorServiceExecutionStrategy'() {
1616
given:
1717
def query = """
1818
query HeroNameAndFriendsQuery {

src/test/groovy/graphql/execution/instrumentation/dataloader/PeopleCompaniesAndProductsDataLoaderTest.groovy

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,12 @@ class PeopleCompaniesAndProductsDataLoaderTest extends Specification {
9292
DataFetcher productsDF = new DataFetcher() {
9393
@Override
9494
Object get(DataFetchingEnvironment environment) {
95-
return IntStream.range(0, 5)
96-
.mapToObj(
97-
{ id ->
98-
List<Integer> madeBy = [id * 10001, id * 10002, id * 10003, id * 10004, id * 10005]
99-
new Product(id.toString(), faker.commerce().productName(), id + 200, madeBy)
100-
})
101-
.collect(Collectors.toList())
95+
List<Product> products = new ArrayList<>();
96+
for (int id = 0; id < 5; id++) {
97+
List<Integer> madeBy = [id * 10001, id * 10002, id * 10003, id * 10004, id * 10005]
98+
products.add(new Product(id.toString(), faker.commerce().productName(), id + 200, madeBy))
99+
}
100+
return products
102101
}
103102
}
104103

0 commit comments

Comments
 (0)