diff --git a/java/ql/src/semmle/code/java/Expr.qll b/java/ql/src/semmle/code/java/Expr.qll index da3463ceed2..c70cfb3943e 100755 --- a/java/ql/src/semmle/code/java/Expr.qll +++ b/java/ql/src/semmle/code/java/Expr.qll @@ -1094,7 +1094,7 @@ class ConditionalExpr extends Expr, @conditionalexpr { } /** A `switch` expression. */ -class SwitchExpr extends Expr, @switchexpr { +deprecated class SwitchExpr extends Expr, @switchexpr { /** Gets an immediate child statement of this `switch` expression. */ Stmt getAStmt() { result.getParent() = this } diff --git a/java/ql/src/semmle/code/java/Statement.qll b/java/ql/src/semmle/code/java/Statement.qll index 9db8d192971..d78edf214a3 100755 --- a/java/ql/src/semmle/code/java/Statement.qll +++ b/java/ql/src/semmle/code/java/Statement.qll @@ -409,10 +409,10 @@ class SwitchCase extends Stmt, @case { SwitchStmt getSwitch() { result.getACase() = this } /** Gets the switch expression to which this case belongs, if any. */ - SwitchExpr getSwitchExpr() { result.getACase() = this } + deprecated SwitchExpr getSwitchExpr() { result.getACase() = this } /** Holds if this `case` is a switch labeled rule of the form `... -> ...`. */ - predicate isRule() { + deprecated predicate isRule() { exists(Expr e | e.getParent() = this | e.getIndex() = -1) or exists(Stmt s | s.getParent() = this | s.getIndex() = -1) @@ -427,13 +427,13 @@ class ConstCase extends SwitchCase { Expr getValue() { result.getParent() = this and result.getIndex() = 0 } /** Gets the `case` constant at the specified index. */ - Expr getValue(int i) { result.getParent() = this and result.getIndex() = i and i >= 0 } + deprecated Expr getValue(int i) { result.getParent() = this and result.getIndex() = i and i >= 0 } /** Gets the expression on the right-hand side of the arrow, if any. */ - Expr getRuleExpression() { result.getParent() = this and result.getIndex() = -1 } + deprecated Expr getRuleExpression() { result.getParent() = this and result.getIndex() = -1 } /** Gets the statement on the right-hand side of the arrow, if any. */ - Stmt getRuleStatement() { result.getParent() = this and result.getIndex() = -1 } + deprecated Stmt getRuleStatement() { result.getParent() = this and result.getIndex() = -1 } /** Gets a printable representation of this statement. May include more detail than `toString()`. */ override string pp() { result = "case ..." } @@ -573,10 +573,10 @@ class BreakStmt extends Stmt, @breakstmt { predicate hasLabel() { exists(string s | s = this.getLabel()) } /** Gets the value of this `break` statement, if any. */ - Expr getValue() { result.getParent() = this } + deprecated Expr getValue() { result.getParent() = this } /** Holds if this `break` statement has a value. */ - predicate hasValue() { exists(Expr e | e.getParent() = this) } + deprecated predicate hasValue() { exists(Expr e | e.getParent() = this) } /** Gets a printable representation of this statement. May include more detail than `toString()`. */ override string pp() {