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

Replaced Stream.collect(Collectors.toList()) with Stream.toList() (Sonar) #1018

Conversation

pixeebot[bot]
Copy link
Contributor

@pixeebot pixeebot bot commented Apr 2, 2024

This change modernizes a stream's List creation to be driven from the simple, and more readable Stream#toList() method.

Our changes look something like this:

- List<Integer> numbers = someStream.collect(Collectors.toList());
+ List<Integer> numbers = someStream.toList();
More reading

I have additional improvements ready for this repo! If you want to see them, leave the comment:

@pixeebot next

... and I will open a new PR right away!

Powered by: pixeebot (codemod ID: sonar:java/replace-stream-collectors-to-list-s6204)

Copy link

sonarcloud bot commented Apr 2, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@Frooodle Frooodle merged commit 54c3bee into main Apr 3, 2024
4 checks passed
@pixeebot pixeebot bot deleted the pixeebot/drip-2024-04-02-sonar-java/replace-stream-collectors-to-list-s6204 branch April 3, 2024 21:41
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 this pull request may close these issues.

None yet

1 participant