Closed shrugalic closed 6 months ago
Thanks for the report.
but from a superficial look it seems removing just any old firstStatement in a constructor seems a bit optimistic?
I confirm this statement, and this issue. It has been detected some time ago, and it seems it is not fixed yet.
This is fixed in cleanthat 2.19. I dropped constructor reference to this()
as it looks like a plain misbehavior.
I successfully verified that the issue was fixed, thanks a lot. 🙏
Setup
We just added
cleanthat
to our Gradle build of a Java 17 project, viaspotless
(v6.25.0), including theSafeButNotConsensual
mutator:Issue / How to reproduce
The
RemoveExplicitCallToSuper
mutator produces erroneous code that does not compile. Here's an example:Expecation
The
this();
call is important and must remain.Issue Localization
When adding
.excludeMutator("RemoveExplicitCallToSuper")
to the configuration, it does not happen.Superficial look
I'm not at all familiar with this code base, and haven't looked into the details, but from a superficial look it seems removing just any old firstStatement in a constructor seems a bit optimistic?