The Eclipse JDT compiler appears to have a problem whereby, under certain circumstances, Java 8 lamdas are not deserializing correctly and instead throw an IllegalArgument
It's caused by this bug with the JDT compiler's handling of anonymous inner classes inside lamda expressions:
"The problem here is that during generation of the deserialize lambda helper method the 'name' of the inner class containing the implementation lambda method is seen as $Local$ when we ought to be using TestClass$1."
It's not been backported to Version: Luna SR2 (4.4.2)
build M20141210-0900
but is verified for for 4.5 M4 I20141208-0800
. I can personally confirm that this bug is fixed in:
Eclipse SDK
Version: Mars (4.5)
Build id: I20141210-2000
Update: Fixed in Luna SR2 (4.4.2)