Bug 515323 - [1.8] "java.lang.IllegalArgumentException: Invalid lambda deserialization"
Summary: [1.8] "java.lang.IllegalArgumentException: Invalid lambda deserialization"
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.7   Edit
Hardware: PC Mac OS X
: P3 major with 7 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact: Srikanth Sankaran CLA
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-16 08:16 EDT by Marco Musolf CLA
Modified: 2023-06-05 05:44 EDT (History)
3 users (show)

See Also:


Attachments
reproducing example (1.47 KB, application/octet-stream)
2019-08-30 08:20 EDT, Alexander Lehmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Musolf CLA 2017-04-16 08:16:25 EDT
In our application using Sprint Boot and Wicket we are getting above exception
during runtime in Neon 4.6.3. It works if we compile and run the application outside Eclipse using java 1.8 compiler.
Comment 1 Marco Musolf CLA 2017-04-18 02:53:41 EDT
Caused by: java.lang.IllegalArgumentException: Invalid lambda deserialization
	at xxx.DropdownVerificationPanel.$deserializeLambda$(DropdownVerificationPanel.java:1) ~[classes/:na]
	... 231 common frames omitted
Comment 2 Stephan Herrmann CLA 2017-04-18 04:33:21 EDT
I'm afraid we'll need some reproducing example before anyone can work on this.
Comment 3 Alexander Lehmann CLA 2019-08-30 08:20:21 EDT
Created attachment 279723 [details]
reproducing example

I can provide a reproducing example to this bug. As far as I can tell, the deserialization fails because of the type parameter. The serialized lambda has an implMethodSignature of '()Ljava/lang/Object;' but the generated $deserializeLambda$-Method expects it to be '()Ljava/lang/Integer;':

private static /* synthetic */ Object $deserializeLambda$(SerializedLambda serializedLambda) {
    switch (serializedLambda.getImplMethodName()) {
        case "get": {
            if (serializedLambda.getImplMethodKind() != 5 ||
                !serializedLambda.getFunctionalInterfaceClass().equals("de/tracetronic/ttstm/LambdaTest$SerializableFunction") ||
                !serializedLambda.getFunctionalInterfaceMethodName().equals("apply") ||
                !serializedLambda.getFunctionalInterfaceMethodSignature().equals("(Ljava/lang/Object;)Ljava/lang/Object;") ||
                !serializedLambda.getImplClass().equals("de/tracetronic/ttstm/LambdaTest$GenericClass") ||
                !serializedLambda.getImplMethodSignature().equals("()Ljava/lang/Integer;")) break;
            return GenericClass::get;
        }
    }
    throw new IllegalArgumentException("Invalid lambda deserialization");
}
Comment 4 Eclipse Genie CLA 2022-05-05 10:34:06 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Srikanth Sankaran CLA 2023-06-05 05:44:08 EDT
Not reproducible on master ...

(I had top change the test case to use import java.io.ByteArrayOutputStream;)