Skip to content

Commit 72b10d3

Browse files
committed
Just return a plain stream
1 parent 77bc58c commit 72b10d3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/test/java/org/mybatis/dynamic/sql/where/condition/FilterAndMapTest.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import java.util.List;
2222
import java.util.Objects;
23-
import java.util.function.Function;
2423
import java.util.stream.Collectors;
2524

2625
import org.junit.jupiter.api.Test;
@@ -433,7 +432,7 @@ void testIsInRenderableMapShouldReturnMappedObject() {
433432
IsIn<String> cond = SqlBuilder.isIn("Fred", "Wilma");
434433
assertThat(cond.isEmpty()).isFalse();
435434
IsIn<String> mapped = cond.map(String::toUpperCase);
436-
List<String> mappedValues = mapped.values().map(Function.identity()).collect(Collectors.toList());
435+
List<String> mappedValues = mapped.values().collect(Collectors.toList());
437436
assertThat(mappedValues).containsExactly("FRED", "WILMA");
438437
}
439438

@@ -442,31 +441,31 @@ void testIsNotInRenderableMapShouldReturnMappedObject() {
442441
IsNotIn<String> cond = SqlBuilder.isNotIn("Fred", "Wilma");
443442
assertThat(cond.isEmpty()).isFalse();
444443
IsNotIn<String> mapped = cond.map(String::toUpperCase);
445-
List<String> mappedValues = mapped.values().map(Function.identity()).collect(Collectors.toList());
444+
List<String> mappedValues = mapped.values().collect(Collectors.toList());
446445
assertThat(mappedValues).containsExactly("FRED", "WILMA");
447446
}
448447

449448
@Test
450449
void testIsNotInCaseInsensitiveRenderableMapShouldReturnMappedObject() {
451450
IsNotInCaseInsensitive cond = SqlBuilder.isNotInCaseInsensitive("Fred ", "Wilma ");
452-
List<String> values = cond.values().map(Function.identity()).collect(Collectors.toList());
451+
List<String> values = cond.values().collect(Collectors.toList());
453452
assertThat(values).containsExactly("FRED ", "WILMA ");
454453
assertThat(cond.isEmpty()).isFalse();
455454

456455
IsNotInCaseInsensitive mapped = cond.map(String::trim);
457-
List<String> mappedValues = mapped.values().map(Function.identity()).collect(Collectors.toList());
456+
List<String> mappedValues = mapped.values().collect(Collectors.toList());
458457
assertThat(mappedValues).containsExactly("FRED", "WILMA");
459458
}
460459

461460
@Test
462461
void testIsInCaseInsensitiveRenderableMapShouldReturnMappedObject() {
463462
IsInCaseInsensitive cond = SqlBuilder.isInCaseInsensitive("Fred ", "Wilma ");
464-
List<String> values = cond.values().map(Function.identity()).collect(Collectors.toList());
463+
List<String> values = cond.values().collect(Collectors.toList());
465464
assertThat(values).containsExactly("FRED ", "WILMA ");
466465
assertThat(cond.isEmpty()).isFalse();
467466

468467
IsInCaseInsensitive mapped = cond.map(String::trim);
469-
List<String> mappedValues = mapped.values().map(Function.identity()).collect(Collectors.toList());
468+
List<String> mappedValues = mapped.values().collect(Collectors.toList());
470469
assertThat(mappedValues).containsExactly("FRED", "WILMA");
471470
}
472471

0 commit comments

Comments
 (0)