Skip to content

Commit e8a1460

Browse files
Vincent PotucekPankraz76
authored andcommitted
preparePotentialNullCheck
1 parent 9e239ef commit e8a1460

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/openrewrite/staticanalysis/EqualsAvoidsNull.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ private void checkPotentialNullCheck(J.MethodInvocation m, final Tree parent) {
9999
if (parent instanceof J.Binary &&
100100
((J.Binary) parent).getOperator() == J.Binary.Type.And &&
101101
((J.Binary) parent).getLeft() instanceof J.Binary) {
102-
avoidPotentialNullCheck(m, (J.Binary) parent, (J.Binary) ((J.Binary) parent).getLeft());
102+
preparePotentialNullCheck(m, (J.Binary) parent, (J.Binary) ((J.Binary) parent).getLeft());
103103
}
104104
}
105105

106-
private void avoidPotentialNullCheck(J.MethodInvocation m, J.Binary parent,
107-
J.Binary potentialNullCheck) {
106+
private void preparePotentialNullCheck(J.MethodInvocation m, J.Binary parent,
107+
J.Binary potentialNullCheck) {
108108
if (isNullLiteral(potentialNullCheck.getLeft()) &&
109109
matchesSelect(getCursor(), potentialNullCheck.getRight(),
110110
requireNonNull(m.getSelect())) ||

0 commit comments

Comments
 (0)