-
Notifications
You must be signed in to change notification settings - Fork 354
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
TRUE/FALSE_RETURNS at odds with NAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION from fb-contrib #957
Comments
It is highly unlikely that the autoboxing in Having said that, codebases and opinions differ, and there may be scenarios where the boxing does make a difference. I'll take a look out at filtering mutatants of this form in the next release. |
@mebigfatguy My apologies for roping you into this, but maybe you have some input on the performance benefits of the linter in question? |
Filter mutants returning Boolean.TRUE & Bollean.FALSE for #957
Released in 1.7.3 |
Thank you very much for addressing it so fast :) |
This repo has 2 response times: 3 years or 3 days. |
I think you decreased the average response time with this one :) |
With Pitest 1.7.2:
Given
the
TRUE_RETURNS
mutator will produce the mutationwhich will always survive as the
true
will be auto-boxed to aBoolean
instance (unless we're testing Boolean instance identity, which seems pointless). The problem is that changing the production code to match the mutation is at odds with theNAB_NEEDLESS_BOOLEAN_CONSTANT_CONVERSION
bug type from fb-contrib (See http://fb-contrib.sourceforge.net/bugdescriptions.html).I might be missing some edge case here, but I think that the
TRUE_RETURNS
mutator shouldn't try to returntrue
in lieu ofBoolean.TRUE
, due to the auto-boxing. I'd be happy to understand if it is indeed a relevant case.The corresponding argument can be made for
FALSE_RETURNS
, of course.The text was updated successfully, but these errors were encountered: