Invalid lambda deserialization

后端 未结 2 1948
有刺的猬
有刺的猬 2021-01-22 14:23

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

相关标签:
2条回答
  • 2021-01-22 14:32

    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)

    0 讨论(0)
  • 2021-01-22 14:35

    Looks like this Eclipse JDT bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=439889

    0 讨论(0)
提交回复
热议问题