Skip to content

Commit 1c06c30

Browse files
Add useless null check
1 parent 275b23c commit 1c06c30

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

java-checks/src/main/java/org/sonar/java/checks/ReadlnWithPromptCheck.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ protected MethodMatchers getMethodInvocationMatchers() {
5858
@Override
5959
protected void onMethodInvocationFound(MethodInvocationTree mit) {
6060
Tree parent = mit.parent();
61-
if (parent == null) {
62-
return;
63-
}
64-
6561
Tree grandParent = parent.parent();
6662
if (grandParent == null || !grandParent.is(Tree.Kind.BLOCK)) {
6763
return;

0 commit comments

Comments
 (0)