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

Skip to content

Commit 3a988d0

Browse files
committed
Java 12: revert addition of deprecated annotations for preview features
1 parent 6d59b4e commit 3a988d0

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

java/ql/src/semmle/code/java/Expr.qll

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,37 +1094,37 @@ class ConditionalExpr extends Expr, @conditionalexpr {
10941094
}
10951095

10961096
/**
1097-
* DEPRECATED: Preview feature in Java 12. Subject to removal in a future release.
1097+
* PREVIEW FEATURE in Java 12. Subject to removal in a future release.
10981098
*
10991099
* A `switch` expression.
11001100
*/
1101-
deprecated class SwitchExpr extends Expr, @switchexpr {
1101+
class SwitchExpr extends Expr, @switchexpr {
11021102
/** Gets an immediate child statement of this `switch` expression. */
1103-
deprecated Stmt getAStmt() { result.getParent() = this }
1103+
Stmt getAStmt() { result.getParent() = this }
11041104

11051105
/**
11061106
* Gets the immediate child statement of this `switch` expression
11071107
* that occurs at the specified (zero-based) position.
11081108
*/
1109-
deprecated Stmt getStmt(int index) { result = this.getAStmt() and result.getIndex() = index }
1109+
Stmt getStmt(int index) { result = this.getAStmt() and result.getIndex() = index }
11101110

11111111
/**
11121112
* Gets a case of this `switch` expression,
11131113
* which may be either a normal `case` or a `default`.
11141114
*/
1115-
deprecated SwitchCase getACase() { result = getAConstCase() or result = getDefaultCase() }
1115+
SwitchCase getACase() { result = getAConstCase() or result = getDefaultCase() }
11161116

11171117
/** Gets a (non-default) `case` of this `switch` expression. */
1118-
deprecated ConstCase getAConstCase() { result.getParent() = this }
1118+
ConstCase getAConstCase() { result.getParent() = this }
11191119

11201120
/** Gets the `default` case of this switch expression, if any. */
1121-
deprecated DefaultCase getDefaultCase() { result.getParent() = this }
1121+
DefaultCase getDefaultCase() { result.getParent() = this }
11221122

11231123
/** Gets the expression of this `switch` expression. */
1124-
deprecated Expr getExpr() { result.getParent() = this }
1124+
Expr getExpr() { result.getParent() = this }
11251125

11261126
/** Gets a result expression of this `switch` expression. */
1127-
deprecated Expr getAResult() {
1127+
Expr getAResult() {
11281128
result = getACase().getRuleExpression()
11291129
or
11301130
exists(BreakStmt break |

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -417,36 +417,36 @@ class SwitchCase extends Stmt, @case {
417417
SwitchStmt getSwitch() { result.getACase() = this }
418418

419419
/**
420-
* DEPRECATED: Preview feature in Java 12. Subject to removal in a future release.
420+
* PREVIEW FEATURE in Java 12. Subject to removal in a future release.
421421
*
422422
* Gets the switch expression to which this case belongs, if any.
423423
*/
424-
deprecated SwitchExpr getSwitchExpr() { result.getACase() = this }
424+
SwitchExpr getSwitchExpr() { result.getACase() = this }
425425

426426
/**
427-
* DEPRECATED: Preview feature in Java 12. Subject to removal in a future release.
427+
* PREVIEW FEATURE in Java 12. Subject to removal in a future release.
428428
*
429429
* Holds if this `case` is a switch labeled rule of the form `... -> ...`.
430430
*/
431-
deprecated predicate isRule() {
431+
predicate isRule() {
432432
exists(Expr e | e.getParent() = this | e.getIndex() = -1)
433433
or
434434
exists(Stmt s | s.getParent() = this | s.getIndex() = -1)
435435
}
436436

437437
/**
438-
* DEPRECATED: Preview feature in Java 12. Subject to removal in a future release.
438+
* PREVIEW FEATURE in Java 12. Subject to removal in a future release.
439439
*
440440
* Gets the expression on the right-hand side of the arrow, if any.
441441
*/
442-
deprecated Expr getRuleExpression() { result.getParent() = this and result.getIndex() = -1 }
442+
Expr getRuleExpression() { result.getParent() = this and result.getIndex() = -1 }
443443

444444
/**
445-
* DEPRECATED: Preview feature in Java 12. Subject to removal in a future release.
445+
* PREVIEW FEATURE in Java 12. Subject to removal in a future release.
446446
*
447447
* Gets the statement on the right-hand side of the arrow, if any.
448448
*/
449-
deprecated Stmt getRuleStatement() { result.getParent() = this and result.getIndex() = -1 }
449+
Stmt getRuleStatement() { result.getParent() = this and result.getIndex() = -1 }
450450
}
451451

452452
/** A constant `case` of a switch statement. */
@@ -457,11 +457,11 @@ class ConstCase extends SwitchCase {
457457
Expr getValue() { result.getParent() = this and result.getIndex() = 0 }
458458

459459
/**
460-
* DEPRECATED: Preview feature in Java 12. Subject to removal in a future release.
460+
* PREVIEW FEATURE in Java 12. Subject to removal in a future release.
461461
*
462462
* Gets the `case` constant at the specified index.
463463
*/
464-
deprecated Expr getValue(int i) { result.getParent() = this and result.getIndex() = i and i >= 0 }
464+
Expr getValue(int i) { result.getParent() = this and result.getIndex() = i and i >= 0 }
465465

466466
/** Gets a printable representation of this statement. May include more detail than `toString()`. */
467467
override string pp() { result = "case ..." }
@@ -608,18 +608,18 @@ class BreakStmt extends Stmt, @breakstmt {
608608
predicate hasLabel() { exists(string s | s = this.getLabel()) }
609609

610610
/**
611-
* DEPRECATED: Preview feature in Java 12. Subject to removal in a future release.
611+
* PREVIEW FEATURE in Java 12. Subject to removal in a future release.
612612
*
613613
* Gets the value of this `break` statement, if any.
614614
*/
615-
deprecated Expr getValue() { result.getParent() = this }
615+
Expr getValue() { result.getParent() = this }
616616

617617
/**
618-
* DEPRECATED: Preview feature in Java 12. Subject to removal in a future release.
618+
* PREVIEW FEATURE in Java 12. Subject to removal in a future release.
619619
*
620620
* Holds if this `break` statement has a value.
621621
*/
622-
deprecated predicate hasValue() { exists(Expr e | e.getParent() = this) }
622+
predicate hasValue() { exists(Expr e | e.getParent() = this) }
623623

624624
/** Gets a printable representation of this statement. May include more detail than `toString()`. */
625625
override string pp() {

0 commit comments

Comments
 (0)