Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cucumber-java8 : 7.3.0 uses java10 method Collectors.toUnmodifiableList #2530

Closed
ashastr opened this issue Apr 20, 2022 · 1 comment · Fixed by #2531
Closed

cucumber-java8 : 7.3.0 uses java10 method Collectors.toUnmodifiableList #2530

ashastr opened this issue Apr 20, 2022 · 1 comment · Fixed by #2531

Comments

@ashastr
Copy link

ashastr commented Apr 20, 2022

👓 What did you see?

Cucumber tests are failing with below error for the latest 7:3:0 version:

java.lang.noSuchMethodError: java.util.stream.Collectors.toUnmodifiableList() Ljava/util/strea/Collector;
at io.cucumber.core.gherkin.messages.GherkinMessagesFeatureParser.parse(GherkinMessagesFeatureParser.java:33)

✅ What did you expect to see?

cucmber-java8 uses only Java8 and below versions.

📦 Which tool/library version are you using?

Java 8
cucumber-java8
cucumber-junit

🔬 How could we reproduce it?

Steps to reproduce the behavior:

  1. Update existing test automation project to cucumber-java8 : 7.3.0, cucumber-junit : 7.3.0
  2. Run the tests
  3. See error
java.lang.noSuchMethodError: java.util.stream.Collectors.toUnmodifiableList() Ljava/util/strea/Collector;
at io.cucumber.core.gherkin.messages.GherkinMessagesFeatureParser.parse(GherkinMessagesFeatureParser.java:33)

📚 Any additional context?


This text was originally generated from a template, then edited by hand. You can modify the template here.

@dmohapa
Copy link

dmohapa commented Apr 20, 2022

I'm also facing this same issue since today morning. Looks like this change pointed out by @anandshastri1990 has made v7.3.0 incompatible with JDK8.

I had to revert to v7.2.3 to get my tests running again

mpkorstanje added a commit that referenced this issue Apr 20, 2022
Collectors.toUnmodifiableList was introduced since java 10.
Which is slightly too modern for us to use.

Fixes #2530
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants