Skip to content

Conversation

@lredor
Copy link
Contributor

@lredor lredor commented Oct 30, 2025

What's changed?

After analysis, I discovered 2 new cases detailed in the commit message.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

In some cases, the type can be inferred, but not always.
To follow the “Do no harm” principle, it’s safer to always "cast" the
`Predicate.isEqual` method explicitly.
Before this commit, certain cases resulted in compilation errors (see
the new test inlinedPredicatesEqualToWithStandardType, which reveals
this problem).
It seems that the recipe NoGuavaMapsNewLinkedHashMap has never been
added in `no-guava.yml`.
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Oct 30, 2025
@timtebeek timtebeek self-requested a review October 30, 2025 16:23
@timtebeek timtebeek changed the title 2 new cases detected Always add explicit type to the Predicate.isEqual method Oct 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants