cucumber-java8 does not work on OpenJDK 12+
See original GitHub issueWhen using OpenJDK 12+ in combination with cucumber-java8
users may experience class cast exceptions. See: Java+Cucumber execution error (java.lang.ClassCastException: class io.cucumber.docstring.DocString cannot be cast to class java.lang.String)
These occur because typetools
is unable to read the parameter types from lambdas on OpenJDK 12+. See https://github.com/jhalterman/typetools/issues/52,
cucumber-java
should not be affected. They’re separate modules since v4.0.0.
Resolving this requires fixing https://github.com/jhalterman/typetools/issues/52 to make TypeTools to work on Java 12+.
Update
The Cucumber team does not have resources available to fix this. We will deprecate cucumber-java8
at some point in the future.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Cucumber - Java8 - using @Before with lambda expressions
If I put them in a method, as shown here, when I run the feature file it runs the @Before statement but does...
Read more >Developers - Deprecate and remove cucumber-java8 - - Bountysource
cucumber-java8 does not work on OpenJDK 12+. The Cucumber team does not have the time and people available to make cucumber-java8 work on...
Read more >When steps are defined using io.cucumber.java.en.Given intllij ...
Given intllij does not recognize it in the feature file. Only when the deprecated cucumber.api.java.en.Given is used is the step identified as implemented....
Read more >Not all OpenJDK 12 builds include Shenandoah: Here's why
i want to install open jdk 8 with shenondoah on RHEL 7 , can i do that? AndrewHaley • 2 years ago. Sure,...
Read more >Cucumber Java 8 Support - Baeldung
The cucumber-java8 dependency can be found on Maven Central. ... As we are using one statement we didn't need curly braces ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The fix in PR #1902 seems to have broken Cucumber tests that were previously running fine in OpenJDK 11.0.4, despite the failure message saying:
The line that was previously working in Java 11 and is now failing is:
I see this problem with cucumber-java8 version 5.7.0.
Good point. Could you create an issue in https://github.com/cucumber/docs and reference:
https://github.com/cucumber/cucumber-jvm/issues/2279