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

Issue #11720: Kill surviving mutation in RequireThisCheck #11775

Merged

Conversation

Vyom-Yadav
Copy link
Member

@Vyom-Yadav Vyom-Yadav commented Jun 27, 2022

#11720
Hardcoded mutation tested at #11771

Reports with hardcoded mutation (clean):

This mutation falls in the category:

  • Safely (no regressions) remove code to be covered

Rationale:

Without the condition if (toVisit == null), curNode = curNode.getParent(); will be executed even when toVisit != null, if toVisit != null, we will break from the loop
while (curNode != null && toVisit == null) and on the very next line after while loop, curNode gets updated curNode = toVisit;, so the previous assignment of
curNode = curNode.getParent();does not make a difference.

@Vyom-Yadav Vyom-Yadav changed the title Issue #7797: Kill surviving mutation in RequireThisCheck Issue #11720: Kill surviving mutation in RequireThisCheck Jun 27, 2022
@Vyom-Yadav Vyom-Yadav force-pushed the killSurvivingMutationInRequireThisCheck branch from 9c4cc34 to 072e6af Compare June 27, 2022 14:45
@baratali baratali requested a review from romani June 27, 2022 18:05
@baratali baratali assigned romani and unassigned baratali Jun 27, 2022
@romani romani merged commit c8c2d8c into checkstyle:master Jun 28, 2022
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

3 participants