testdata for IDEA-127124 comment

This commit is contained in:
Anna Kozlova
2014-08-12 16:08:07 +04:00
parent a218280be4
commit 68248573dd
2 changed files with 33 additions and 0 deletions
@@ -0,0 +1,30 @@
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Collectors;
class Test {
private static class Thing {
final String val;
public Thing(String val) {
this.val = val;
}
}
public static Optional<List<String>> highlights() {
return Optional.of(Collections.singletonList(new Thing("Hello")))
.map(l -> l
.stream()
.map(t -> t.val + " world!")
.collect(Collectors.toList()));
}
public static Optional<List<String>> works() {
return Optional.of(Collections.singletonList(new Thing("Hello")))
.map(l -> l
.stream()
.map(t -> t.val + " world!")
.collect(Collectors.toList()));
}
}