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

Introduce ImmutableMapCopyOfMapsFilter{Keys,Values} Refaster rules #517

Merged
merged 5 commits into from
Mar 3, 2023

Conversation

Ptijohn
Copy link
Contributor

@Ptijohn Ptijohn commented Mar 2, 2023

Hesitated for a sec to also cover FilterEntries, but I reckon this has less usages and will somehow conflict with FilterValues and FilterKeys, so I left it out.

Suggested commit message:

Introduce `ImmutableMapFilter{Keys,Values}` Refaster rules (#517)

@github-actions
Copy link

github-actions bot commented Mar 2, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Ptijohn Ptijohn requested a review from rickie March 2, 2023 11:26
* Prefer {@link Maps#filterKeys(Map, Predicate)} over streaming entries of a map and filtering
* the keys.
*/
abstract static class ImmutableMapFilterKeys<K, V> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those could be higher in the file 🤔
Didn't find an obvious candidate.

Copy link
Member

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

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

Tnx! Indeed inside Picnic we generally prefer the alternative. Added a commit with some tweaks. Suggested commit message:

Introduce `ImmutableMapCopyOfMapsFilter{Keys,Values}` Refaster rules (#517)

@github-actions
Copy link

github-actions bot commented Mar 2, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Stephan202 Stephan202 added this to the 0.9.0 milestone Mar 2, 2023
@Ptijohn
Copy link
Contributor Author

Ptijohn commented Mar 3, 2023

Thanks @Stephan202 for the suggestions 💪

@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link
Member

@rickie rickie left a comment

Choose a reason for hiding this comment

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

Changes LGTM! Added a commit to drop a now obsolete comment :).

Again, nice improvements @Ptijohn, thanks for picking up! 🚀

@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

1 similar comment
@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@rickie rickie force-pushed the bdiederichs/map-filter-values branch from 913f377 to f2a961d Compare March 3, 2023 09:22
@rickie
Copy link
Member

rickie commented Mar 3, 2023

Rebased, will merge once 🟢!

@github-actions
Copy link

github-actions bot commented Mar 3, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Stephan202
Copy link
Member

Changes LGTM :)

@rickie rickie changed the title Introduce ImmutableMapFilter{Keys,Values} Refaster rules Introduce ImmutableMapCopyOfMapsFilter{Keys,Values} Refaster rules Mar 3, 2023
@rickie rickie merged commit b267b4d into master Mar 3, 2023
@rickie rickie deleted the bdiederichs/map-filter-values branch March 3, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants