Re: Java 8 and type erasure
Posted by
Aljoscha Krettek on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Java-8-and-type-erasure-tp2411p2414.html
Hi Kristoffer,
Type is: class org.apache.flink.examples.java8.wordcount.TypeTest$Thing
class org.apache.flink.examples.java8.wordcount.TypeTest$Thing
Type is: class org.apache.flink.examples.java8.wordcount.TypeTest$Thing
class org.apache.flink.examples.java8.wordcount.TypeTest$Thing
Type is : org.apache.flink.examples.java8.wordcount.TypeTest.org.apache.flink.examples.java8.wordcount.TypeTest$Thing<java.lang.String>
class org.apache.flink.examples.java8.wordcount.TypeTest$Thing
So with the two lambda calls it does not correctly determine the generic parameter of Thing while it works with the anonymous class.
I was exited when I saw the example because we've been trying for so long to get this to work. Maybe we have to wait for java 19 to get this to work. ;-)
Thanks a lot for helping, though. :D
Aljoscha