Skip to content

Commit 5511955

Browse files
committed
Simplify getCaseIndex
1 parent bbc0f29 commit 5511955

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/lib/semmle/code/java/Statement.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ class SwitchCase extends Stmt, @case {
461461
* Gets this case's ordinal in its switch block.
462462
*/
463463
int getCaseIndex() {
464-
this = this.getSwitch().getCase(result) or this = this.getSwitchExpr().getCase(result)
464+
this = any(SwitchStmt ss).getCase(result) or this = any(SwitchExpr se).getCase(result)
465465
}
466466

467467
/**

0 commit comments

Comments
 (0)