Skip to content

Commit 78faeac

Browse files
committed
Fix build with jdk8
- Remove non jdk8 code used in #694
1 parent 041cb30 commit 78faeac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-shell-core/src/test/java/org/springframework/shell/command/CommandExecutionCustomConversionTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.util.ArrayList;
1919
import java.util.List;
2020
import java.util.Set;
21+
import java.util.stream.Collectors;
2122

2223
import org.junit.jupiter.api.Test;
2324

@@ -169,7 +170,7 @@ public void testCustomPojoSet() {
169170
assertThat(pojo1.method4Pojo2).isNotNull();
170171
assertThat(pojo1.method4Pojo2.size()).isEqualTo(2);
171172
assertThat(pojo1.method4Pojo2.iterator().next()).isInstanceOf(Pojo2.class);
172-
assertThat(pojo1.method4Pojo2.stream().map(pojo -> pojo.arg).toList()).containsExactly("a", "b");
173+
assertThat(pojo1.method4Pojo2.stream().map(pojo -> pojo.arg).collect(Collectors.toList())).containsExactly("a", "b");
173174
}
174175

175176
@Test
@@ -193,7 +194,7 @@ public void testCustomPojoSetPositional() {
193194
assertThat(pojo1.method4Pojo2).isNotNull();
194195
assertThat(pojo1.method4Pojo2.size()).isEqualTo(2);
195196
assertThat(pojo1.method4Pojo2.iterator().next()).isInstanceOf(Pojo2.class);
196-
assertThat(pojo1.method4Pojo2.stream().map(pojo -> pojo.arg).toList()).containsExactly("a", "b");
197+
assertThat(pojo1.method4Pojo2.stream().map(pojo -> pojo.arg).collect(Collectors.toList())).containsExactly("a", "b");
197198
}
198199

199200
private CommandExecution build() {

0 commit comments

Comments
 (0)