Skip to content

Adjust how negation is handled when simplifying boolean expressions#6111

Merged
jkschneider merged 3 commits intomainfrom
fix-csa-issue
Oct 10, 2025
Merged

Adjust how negation is handled when simplifying boolean expressions#6111
jkschneider merged 3 commits intomainfrom
fix-csa-issue

Conversation

@Laurens-W
Copy link
Copy Markdown
Contributor

What's changed?

Adjusted how negation is handled when simplifying boolean expressions

What's your motivation?

!(o1 == null ? o2 == null : o1.equals(o2)) was being converted to o1 != null ? o1.equals(o2) : o2 == null which is incorrect

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

@Laurens-W Laurens-W marked this pull request as ready for review October 8, 2025 11:55
@Laurens-W Laurens-W requested a review from timtebeek October 8, 2025 11:55
@jkschneider jkschneider merged commit 74df6d0 into main Oct 10, 2025
2 checks passed
@jkschneider jkschneider deleted the fix-csa-issue branch October 10, 2025 01:30
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Oct 10, 2025
@jkschneider jkschneider changed the title Fix CSA issue Adjust how negation is handled when simplifying boolean expressions Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants