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

Ignore primitive casts in ClassCastLambdaUsage check #1385

Merged

Conversation

mohamedsamehsalah
Copy link
Contributor

@mohamedsamehsalah mohamedsamehsalah commented Oct 30, 2024

  • As using the Class#cast does not implicitly auto-(un)box the primitives.

Suggested commit message:

Ignore primitive casts in `ClassCastLambdaUsage` check (#1385)

@mohamedsamehsalah mohamedsamehsalah added this to the 0.19.0 milestone Oct 30, 2024
Copy link

  • Surviving mutants in this change: 1
  • Killed mutants in this change: 5
class surviving killed
🧟tech.picnic.errorprone.bugpatterns.ClassCastLambdaUsage 1 5

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

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.

Added a commit with some suggestions. Thx @mohamedsamehsalah!

@Stephan202 Stephan202 changed the title Exclude primitives in ClassCastLambdaUsage check Ignore primitive casts in ClassCastLambdaUsage check Oct 30, 2024
Copy link

Copy link

  • Surviving mutants in this change: 1
  • Killed mutants in this change: 5
class surviving killed
🧟tech.picnic.errorprone.bugpatterns.ClassCastLambdaUsage 1 5

Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

* types as the cast operator.
*/
// XXX: Depending on the declared type of the value being cast, in some cases we _can_ rewrite
// primitive casts. Add support for this.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@rickie rickie added the bug fix label Oct 30, 2024
@rickie
Copy link
Member

rickie commented Oct 30, 2024

Quick fix @mohamedsamehsalah , niceeee!

@rickie rickie merged commit ce6931c into master Oct 30, 2024
16 checks passed
@rickie rickie deleted the mohamedsamehsalah/class-lambda-usage-exclude-primitives branch October 30, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants