Skip to content

Commit e7239db

Browse files
authored
[Core] Remove usage of since Collectors.toUnmodifiableList (#2531)
Collectors.toUnmodifiableList was introduced since java 10. Which is slightly too modern for us to use. Fixes #2530
1 parent 4d54a96 commit e7239db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1616
### Removed
1717

1818
### Fixed
19+
- [Core] Removed usage of since Java 10 `Collectors.toUnmodifiableList()` method ([#2531](https://github.com/cucumber/cucumber-jvm/pull/2531) M.P. Korstanje)
1920

2021
## [7.3.0] (2022-04-19)
2122

gherkin-messages/src/main/java/io/cucumber/core/gherkin/messages/GherkinMessagesFeatureParser.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import java.util.Optional;
1818
import java.util.UUID;
1919
import java.util.function.Supplier;
20-
import java.util.stream.Collectors;
2120

2221
import static io.cucumber.messages.types.SourceMediaType.TEXT_X_CUCUMBER_GHERKIN_PLAIN;
2322
import static java.util.stream.Collectors.toList;
@@ -30,7 +29,7 @@ public Optional<Feature> parse(URI path, String source, Supplier<UUID> idGenerat
3029
.idGenerator(() -> idGenerator.get().toString())
3130
.build()
3231
.parse(Envelope.of(new Source(path.toString(), source, TEXT_X_CUCUMBER_GHERKIN_PLAIN)))
33-
.collect(Collectors.toUnmodifiableList());
32+
.collect(toList());
3433

3534
List<String> errors = envelopes.stream()
3635
.map(Envelope::getParseError)

0 commit comments

Comments
 (0)