Skip to content

Commit

Permalink
Fix negate ternary (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek authored Jan 8, 2024
1 parent 656a61d commit b52c2b7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ void invertedBooleanHandled() {
class Foo {
void test(String s, String other) {
String test = !StringUtils.equalsIgnoreCase(s, other);
boolean test = !StringUtils.equalsIgnoreCase(s, other);
}
}
""",
"""
class Foo {
void test(String s, String other) {
String test = !(s == null ? other == null : s.equalsIgnoreCase(other));
boolean test = !(s == null ? other == null : s.equalsIgnoreCase(other));
}
}
"""
Expand Down

0 comments on commit b52c2b7

Please sign in to comment.