You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue does not seem to be Java 8 vs Java 11 per-se, but rather the Java 8 lambda runtime vs the Java 11 lambda runtime. So I am not expecting the test to pass simply using a Java 8 JRE.
I'm not sure if the code in this library even existed in the Java 8 lambda runtime, but nevertheless the code in this library does behave differently to the equivalent code in the Java 8 runtime.
Unfortunately in my real application there is more than one child type, and which type will be used is not known until runtime - so it is not possible to statically declare the child type.
Activity
msailes commentedon Jul 28, 2022
Hi @Dretch,
I tried your sample and I couldn't get it to pass with Java 8. Could you provide a sample which is passing.
Thanks,
Dretch commentedon Jul 28, 2022
Thanks for looking @msailes
The issue does not seem to be Java 8 vs Java 11 per-se, but rather the Java 8 lambda runtime vs the Java 11 lambda runtime. So I am not expecting the test to pass simply using a Java 8 JRE.
I'm not sure if the code in this library even existed in the Java 8 lambda runtime, but nevertheless the code in this library does behave differently to the equivalent code in the Java 8 runtime.
Dretch commentedon Aug 5, 2022
I have created a proof-of-concept that shows how the Java 8 runtime works but the Java 11 runtime does not: https://github.com/Dretch/java-11-lambda-missing-fields-poc (see project README).
Hopefully this helps to investigate the issue.
msailes commentedon Aug 12, 2022
Hi @Dretch,
You are correct, there is a difference between the two versions in this case. The fix would be to use the child type instead.
Thanks.
Dretch commentedon Aug 12, 2022
Hi @msailes ,
Unfortunately in my real application there is more than one child type, and which type will be used is not known until runtime - so it is not possible to statically declare the child type.
maxday commentedon Aug 6, 2025
hi @Dretch
Following up (super late) on this, are you still facing the issue?
Thanks