Closed pixeebot[bot] closed 2 months ago
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
21.4% Duplication on New Code
@pixeebot next
@ryandens, I don't have any suggestions at this time, but I am always learning, and I will let you know if anything comes up!
@ryandens, I don't have any suggestions at this time, but I am always learning, and I will let you know if anything comes up!
Remediation
This change fixes "
Stream.toList()
should be used instead ofcollectors
" (id = java:S6204) identified by Sonar.Details
This change modernizes a stream's
List
creation to be driven from the simple, and more readable [Stream#toList()
](https://docs.oracle.com/javase/16/docs/api/java.base/java/util/stream/Collectors.html#toList()) method.Our changes look something like this:
More reading
* [https://rules.sonarsource.com/java/RSPEC-6204/](https://rules.sonarsource.com/java/RSPEC-6204/)🧚🤖 Powered by Pixeebot
Feedback | Community | Docs | Codemod ID: sonar:java/replace-stream-collectors-to-list-s6204