Skip to content

Issue #13809: Kill mutation in Checker-3#13913

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:checker3
Oct 21, 2023
Merged

Issue #13809: Kill mutation in Checker-3#13913
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:checker3

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

Issue #13809: Kill mutation in Checker-3


Mutation

<mutation unstable="false">
<sourceFile>Checker.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.Checker</mutatedClass>
<mutatedMethod>getExternalResourceLocations</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/util/stream/Stream::map with receiver</description>
<lineContent>.map(ExternalResourceHolder.class::cast)</lineContent>
</mutation>

Copy link
Copy Markdown
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
As we do filter(ExternalResourceHolder.class::isInstance)

But this case should be added to list of bad stuff of pitest, as code becomes less pretty.

Copy link
Copy Markdown
Member

@rdiachenko rdiachenko left a comment

Choose a reason for hiding this comment

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

lgtm

@rdiachenko
Copy link
Copy Markdown
Member

rebased

@rdiachenko rdiachenko assigned romani and unassigned rdiachenko Oct 20, 2023
@romani romani requested a review from Vyom-Yadav October 20, 2023 18:40
@romani romani assigned Vyom-Yadav and unassigned romani Oct 20, 2023
Copy link
Copy Markdown
Member

@Vyom-Yadav Vyom-Yadav left a comment

Choose a reason for hiding this comment

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

LGTM!

No decompiler seems to get it right mutant2.class.gz.

I can come up with different types of solution for this but strangely no decompiler gives compilable code, please try if you have time.

@Vyom-Yadav Vyom-Yadav assigned romani and unassigned Vyom-Yadav Oct 21, 2023
@romani romani merged commit 2593e21 into checkstyle:master Oct 21, 2023
@romani
Copy link
Copy Markdown
Member

romani commented Oct 21, 2023

Added to #13142

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.

4 participants