Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 556feb3

Browse files
committed
Autoformat
1 parent 936c020 commit 556feb3

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

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

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,7 @@ class SwitchStmt extends Stmt, @switchstmt {
413413
Expr getExpr() { result.getParent() = this }
414414

415415
/** Holds if this switch has a case handling a null literal. */
416-
predicate hasNullCase() {
417-
this.getAConstCase().getValue(_) instanceof NullLiteral
418-
}
416+
predicate hasNullCase() { this.getAConstCase().getValue(_) instanceof NullLiteral }
419417

420418
override string pp() { result = "switch (...)" }
421419

@@ -506,12 +504,10 @@ class SwitchCase extends Stmt, @case {
506504
*/
507505
class ConstCase extends SwitchCase {
508506
ConstCase() {
509-
exists(Expr e |
510-
e.getParent() = this and e.getIndex() >= 0 and not e instanceof Pattern
511-
)
507+
exists(Expr e | e.getParent() = this and e.getIndex() >= 0 and not e instanceof Pattern) and
512508
// For backward compatibility, we don't include `case null, default:` here, on the assumption
513509
// this will come as a surprise to CodeQL that predates that statement's validity.
514-
and not isNullDefaultCase(this)
510+
not isNullDefaultCase(this)
515511
}
516512

517513
/** Gets the `case` constant at index 0. */
@@ -543,13 +539,9 @@ class Pattern extends Expr {
543539
(this instanceof LocalVariableDeclExpr or this instanceof RecordPatternExpr)
544540
}
545541

546-
LocalVariableDeclExpr asBindingPattern() {
547-
result = this
548-
}
542+
LocalVariableDeclExpr asBindingPattern() { result = this }
549543

550-
RecordPatternExpr asRecordPattern() {
551-
result = this
552-
}
544+
RecordPatternExpr asRecordPattern() { result = this }
553545
}
554546

555547
/** A pattern case of a `switch` statement */

0 commit comments

Comments
 (0)