https://kotlinlang.org logo
Title
m

marlin

05/01/2018, 1:58 PM
If I don't do the flatmapelements method it performs as the java code. Only the flatmapelements produce errors.
a

Andreas Sinz

05/01/2018, 2:38 PM
Show us the stacktrace of the exception
@marlin The java version that only splits the string works?
m

marlin

05/01/2018, 2:58 PM
Yes
a

Andreas Sinz

05/01/2018, 3:01 PM
You could try the following:
.via(SerializableFunction : { word: String -> word.split(" ") })
what is the type of
lines
?
m

marlin

05/01/2018, 3:19 PM
PCollection<String!>!
a

Andreas Sinz

05/01/2018, 3:20 PM
is it possible that
lines
contains `null`s?
m

marlin

05/01/2018, 3:50 PM
no...
a

Andreas Sinz

05/01/2018, 4:08 PM
does it happen during the creation of
FlatMapElements
or when it is actually applied to
lines
?