Skip to content

Commit

Permalink
Remove usage of since java 10 Collectors.toUnmodifiableList
Browse files Browse the repository at this point in the history
  • Loading branch information
mpkorstanje committed Apr 20, 2022
1 parent 4d54a96 commit 24564df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Removed

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import java.util.Optional;
import java.util.UUID;
import java.util.function.Supplier;
import java.util.stream.Collectors;

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

List<String> errors = envelopes.stream()
.map(Envelope::getParseError)
Expand Down

0 comments on commit 24564df

Please sign in to comment.