Conversation
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
| /** Prefer {@link List#getFirst()} over less idiomatic alternatives. */ | ||
| static final class ListGetFirst<T> { | ||
| @BeforeTemplate | ||
| T before(List<T> list) { | ||
| return list.get(0); | ||
| } | ||
|
|
||
| @AfterTemplate | ||
| T after(List<T> list) { | ||
| return list.getFirst(); | ||
| } | ||
| } |
There was a problem hiding this comment.
Not all list.get(0) expressions are replaced by the self check. Requires further investigation.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
0bcc409 to
7252240
Compare
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
Initially the new rules didn't match for invocations on |
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
91bde89 to
8e4c632
Compare
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
88fe7a6 to
449b750
Compare
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
rickie
left a comment
There was a problem hiding this comment.
Perfectly structured PR. Nice effort and I like the JDK 21 improvements 🚀 !
Amazing work @Stephan202 !
ac3ee99 to
96f070e
Compare
WIP: - Move Refaster rule changes to a separate PR. - Investigate other cleanup opportunities.
96f070e to
67d7d5f
Compare
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |
|
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed. |



❗
To be merged after #1942. ❗Suggested commit message (to be augmented later):
This is a
draftPR, to be merged just before we upgrade to the next version of Error Prone, which itself will target Java 21. Open points:Release one more version of Error Prone Support targeting Java 17 before merging this PR.✔️Move the Refaster rule changes to a separate PR, to be merged after this one.✔️Drop the Java 17 assumption made by✔️website/generate-version-compatibility-overview.sh.Understand why not all✔️list.get(0)occurrences are flagged by the newListGetFirstRefaster rule.Investigate other cleanup opportunities and improvements that may be unlocked by targeting Java 21.✔️Note that raising the build baseline to Java 25 isn't strictly necessary, but it (a) matches what we do for Maven (i.e., always requires the latest version) and (b) means that we retain the need for the Maven Toolchains setup (otherwise I'd be torn to drop all that for the time being, only to have to reintroduce it again later). I propose that we officially move to a cadence where we build with the latest LTS and target the oldest LTS supported by Error Prone.