From 78faeac86ae3a3ea25e8956c8eae67317b376987 Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Thu, 6 Apr 2023 07:18:53 +0100 Subject: [PATCH] Fix build with jdk8 - Remove non jdk8 code used in #694 --- .../shell/command/CommandExecutionCustomConversionTests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-shell-core/src/test/java/org/springframework/shell/command/CommandExecutionCustomConversionTests.java b/spring-shell-core/src/test/java/org/springframework/shell/command/CommandExecutionCustomConversionTests.java index fe3dc690..379d080a 100644 --- a/spring-shell-core/src/test/java/org/springframework/shell/command/CommandExecutionCustomConversionTests.java +++ b/spring-shell-core/src/test/java/org/springframework/shell/command/CommandExecutionCustomConversionTests.java @@ -18,6 +18,7 @@ package org.springframework.shell.command; import java.util.ArrayList; import java.util.List; import java.util.Set; +import java.util.stream.Collectors; import org.junit.jupiter.api.Test; @@ -169,7 +170,7 @@ public class CommandExecutionCustomConversionTests { assertThat(pojo1.method4Pojo2).isNotNull(); assertThat(pojo1.method4Pojo2.size()).isEqualTo(2); assertThat(pojo1.method4Pojo2.iterator().next()).isInstanceOf(Pojo2.class); - assertThat(pojo1.method4Pojo2.stream().map(pojo -> pojo.arg).toList()).containsExactly("a", "b"); + assertThat(pojo1.method4Pojo2.stream().map(pojo -> pojo.arg).collect(Collectors.toList())).containsExactly("a", "b"); } @Test @@ -193,7 +194,7 @@ public class CommandExecutionCustomConversionTests { assertThat(pojo1.method4Pojo2).isNotNull(); assertThat(pojo1.method4Pojo2.size()).isEqualTo(2); assertThat(pojo1.method4Pojo2.iterator().next()).isInstanceOf(Pojo2.class); - assertThat(pojo1.method4Pojo2.stream().map(pojo -> pojo.arg).toList()).containsExactly("a", "b"); + assertThat(pojo1.method4Pojo2.stream().map(pojo -> pojo.arg).collect(Collectors.toList())).containsExactly("a", "b"); } private CommandExecution build() {