Closed yeikel closed 2 years ago
Good Morning @yeikel :) Both of these conversions should be accounted for:
That's awesome. Thank you!
Unfortunately, it seems that this doc is outdated : https://docs.openrewrite.org/reference/recipes/java/cleanup/cleanup
I was able to find that rule in the sidebar but not in the main recipe list
sure there are a lot of recipes to look through and not all of them are included in the cleanup or static-code-analysis recipes. 🤔 NoDoubleBraceInitialization
may be a good Cleanup
recipe candidate.
Oh, maybe I misunderstood but I thought that the fact that it is under the cleanup package makes it already a cleanup recipe
That is correct, and I can appreciate the misunderstanding. The Cleanup
recipe is a selected set of recipes intended to catch most of the cleanup issues without being too noisy for a reasonable code-review effort. In some cases like NoDoubleBraceInitialization
and UseMapOf
the developer has an option and the result may require a more careful review.
That is correct, and I can appreciate the misunderstanding. The
Cleanup
recipe is a selected set of recipes intended to catch most of the cleanup issues without being too noisy for a reasonable code-review effort. In some cases likeNoDoubleBraceInitialization
andUseMapOf
the developer has an option and the result may require a more careful review.
Thank you for clarifying :)
Java 8 compliant :
Java 11 compliant (immutable) :
More context : https://rules.sonarsource.com/java/RSPEC-3599