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 #12587: resolves modifier pitest suppression #12588

Merged
merged 1 commit into from Jan 6, 2023

Conversation

rnveach
Copy link
Member

@rnveach rnveach commented Jan 5, 2023

Issue #12587

https://checkstyle.org/config_modifier.html#RedundantModifier_Properties

Report: http://rveach.no-ip.org/checkstyle/regression/322/
No differences.

The old code is more a minor speed up in processing time and we don't lose much by removing it.

The method is processMethods and the AST given to it is always a METHOD_DEF. Usually we go 1 up on this before starting the loop, so it never starts with METHOD_DEF. However, even if it does start with METHOD_DEF all the cases inside the loop are not METHOD_DEF, so it goes straight to the last case which is the same the code we are removing, which is go up 1 parent.

Thus, its the same exact processing, except it takes a few more condition checks to realize this. It isn't a big jump in processing time, so I am ok to just remove the impacted code.

If we care about fixing this so processing time isn't increased (we are talking 4 extra condition checks comparing integers), then the only way is to either keep the suppression or I believe we can use reflection to create a test and kill the mutation the only way possible (direct calling the method).

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to merge

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