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

Skip to content

Commit 9d2f768

Browse files
committed
Java 14: switch expressions are no longer in preview
1 parent 057155f commit 9d2f768

3 files changed

Lines changed: 1 addition & 15 deletions

File tree

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,8 +1076,6 @@ class ConditionalExpr extends Expr, @conditionalexpr {
10761076
}
10771077

10781078
/**
1079-
* PREVIEW FEATURE in Java 13. Subject to removal in a future release.
1080-
*
10811079
* A `switch` expression.
10821080
*/
10831081
class SwitchExpr extends Expr, @switchexpr {

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

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

419419
/**
420-
* PREVIEW FEATURE in Java 13. Subject to removal in a future release.
421-
*
422420
* Gets the switch expression to which this case belongs, if any.
423421
*/
424422
SwitchExpr getSwitchExpr() { result.getACase() = this }
@@ -432,8 +430,6 @@ class SwitchCase extends Stmt, @case {
432430
}
433431

434432
/**
435-
* PREVIEW FEATURE in Java 13. Subject to removal in a future release.
436-
*
437433
* Holds if this `case` is a switch labeled rule of the form `... -> ...`.
438434
*/
439435
predicate isRule() {
@@ -443,15 +439,11 @@ class SwitchCase extends Stmt, @case {
443439
}
444440

445441
/**
446-
* PREVIEW FEATURE in Java 13. Subject to removal in a future release.
447-
*
448442
* Gets the expression on the right-hand side of the arrow, if any.
449443
*/
450444
Expr getRuleExpression() { result.getParent() = this and result.getIndex() = -1 }
451445

452446
/**
453-
* PREVIEW FEATURE in Java 13. Subject to removal in a future release.
454-
*
455447
* Gets the statement on the right-hand side of the arrow, if any.
456448
*/
457449
Stmt getRuleStatement() { result.getParent() = this and result.getIndex() = -1 }
@@ -465,8 +457,6 @@ class ConstCase extends SwitchCase {
465457
Expr getValue() { result.getParent() = this and result.getIndex() = 0 }
466458

467459
/**
468-
* PREVIEW FEATURE in Java 13. Subject to removal in a future release.
469-
*
470460
* Gets the `case` constant at the specified index.
471461
*/
472462
Expr getValue(int i) { result.getParent() = this and result.getIndex() = i and i >= 0 }
@@ -624,8 +614,6 @@ class BreakStmt extends Stmt, @breakstmt {
624614
}
625615

626616
/**
627-
* PREVIEW FEATURE in Java 13. Subject to removal in a future release.
628-
*
629617
* A `yield` statement.
630618
*/
631619
class YieldStmt extends Stmt, @yieldstmt {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
//semmle-extractor-options: --javac-args --enable-preview -source 13 -target 13
1+
//semmle-extractor-options: --javac-args -source 14 -target 14

0 commit comments

Comments
 (0)