Skip to content

Commit a4e5d75

Browse files
committed
Java: delete old deprecations
1 parent d5ec781 commit a4e5d75

File tree

4 files changed

+5
-24
lines changed

4 files changed

+5
-24
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* Deleted the deprecated `LocalClassDeclStmtNode` and `LocalClassDeclStmt` classes from `PrintAst.qll` and `Statement.qll` respectively.
5+
* Deleted the deprecated `getLocalClass` predicate from `LocalTypeDeclStmt`, and the deprecated `getLocalClassDeclStmt` predicate from `LocalClassOrInterface`.

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,6 @@ final class LocalTypeDeclStmtNode extends ExprStmtNode {
393393
}
394394
}
395395

396-
/**
397-
* DEPRECATED: Renamed `LocalTypeDeclStmtNode` to reflect the fact that
398-
* as of Java 16 interfaces can also be declared locally, not just classes.
399-
*/
400-
deprecated class LocalClassDeclStmtNode = LocalTypeDeclStmtNode;
401-
402396
/**
403397
* A node representing a `ForStmt`.
404398
*/

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -781,12 +781,6 @@ class LocalTypeDeclStmt extends Stmt, @localtypedeclstmt {
781781
/** Gets the local type declared by this statement. */
782782
LocalClassOrInterface getLocalType() { isLocalClassOrInterface(result, this) }
783783

784-
/**
785-
* DEPRECATED: Renamed `getLocalType` to reflect the fact that
786-
* as of Java 16 interfaces can also be declared locally, not just classes.
787-
*/
788-
deprecated LocalClassOrInterface getLocalClass() { result = this.getLocalType() }
789-
790784
private string getDeclKeyword() {
791785
result = "class" and this.getLocalType() instanceof Class
792786
or
@@ -802,12 +796,6 @@ class LocalTypeDeclStmt extends Stmt, @localtypedeclstmt {
802796
override string getAPrimaryQlClass() { result = "LocalTypeDeclStmt" }
803797
}
804798

805-
/**
806-
* DEPRECATED: Renamed `LocalTypeDeclStmt` to reflect the fact that
807-
* as of Java 16 interfaces can also be declared locally, not just classes.
808-
*/
809-
deprecated class LocalClassDeclStmt = LocalTypeDeclStmt;
810-
811799
/** An explicit `this(...)` constructor invocation. */
812800
class ThisConstructorInvocationStmt extends Stmt, ConstructorCall, @constructorinvocationstmt {
813801
/** Gets an argument of this constructor invocation. */

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -828,12 +828,6 @@ class LocalClassOrInterface extends NestedType, ClassOrInterface {
828828
/** Gets the statement that declares this local class. */
829829
LocalTypeDeclStmt getLocalTypeDeclStmt() { isLocalClassOrInterface(this, result) }
830830

831-
/**
832-
* DEPRECATED: renamed `getLocalTypeDeclStmt` to reflect the fact that
833-
* as of Java 16 interfaces can also be declared locally.
834-
*/
835-
deprecated LocalTypeDeclStmt getLocalClassDeclStmt() { result = this.getLocalTypeDeclStmt() }
836-
837831
override string getAPrimaryQlClass() { result = "LocalClassOrInterface" }
838832
}
839833

0 commit comments

Comments
 (0)