```val items = Arrays.asList("a", "b", "c") // doe...
# announcements
r
Copy code
val items = Arrays.asList("a", "b", "c")
// doesn't compile because it is Stream<String?>!
val stream: Stream<String> = items
    .stream()
    .map { item ->
       // call that returns nullable, i.e. String?
    }
    .filter(Objects::nonNull)
u
Does
items.filterNotNull().stream()
suit?
r
so my actual use case is a bit different, it’s more like
h
!!
is sometimes a necessary evil when working with platform types:
Copy code
val stream: Stream<String> = items
            .stream()
            .filter(Objects::nonNull)
            .map { it!! }
r
cool, thats probably ok for me
thanks