Skip to content

Commit

Permalink
Java: delete old deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-krogh committed Nov 17, 2022
1 parent d5ec781 commit a4e5d75
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 24 deletions.
5 changes: 5 additions & 0 deletions java/ql/lib/change-notes/2022-11-17-deleted-deps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
category: minorAnalysis
---
* Deleted the deprecated `LocalClassDeclStmtNode` and `LocalClassDeclStmt` classes from `PrintAst.qll` and `Statement.qll` respectively.
* Deleted the deprecated `getLocalClass` predicate from `LocalTypeDeclStmt`, and the deprecated `getLocalClassDeclStmt` predicate from `LocalClassOrInterface`.
6 changes: 0 additions & 6 deletions java/ql/lib/semmle/code/java/PrintAst.qll
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,6 @@ final class LocalTypeDeclStmtNode extends ExprStmtNode {
}
}

/**
* DEPRECATED: Renamed `LocalTypeDeclStmtNode` to reflect the fact that
* as of Java 16 interfaces can also be declared locally, not just classes.
*/
deprecated class LocalClassDeclStmtNode = LocalTypeDeclStmtNode;

/**
* A node representing a `ForStmt`.
*/
Expand Down
12 changes: 0 additions & 12 deletions java/ql/lib/semmle/code/java/Statement.qll
Original file line number Diff line number Diff line change
Expand Up @@ -781,12 +781,6 @@ class LocalTypeDeclStmt extends Stmt, @localtypedeclstmt {
/** Gets the local type declared by this statement. */
LocalClassOrInterface getLocalType() { isLocalClassOrInterface(result, this) }

/**
* DEPRECATED: Renamed `getLocalType` to reflect the fact that
* as of Java 16 interfaces can also be declared locally, not just classes.
*/
deprecated LocalClassOrInterface getLocalClass() { result = this.getLocalType() }

private string getDeclKeyword() {
result = "class" and this.getLocalType() instanceof Class
or
Expand All @@ -802,12 +796,6 @@ class LocalTypeDeclStmt extends Stmt, @localtypedeclstmt {
override string getAPrimaryQlClass() { result = "LocalTypeDeclStmt" }
}

/**
* DEPRECATED: Renamed `LocalTypeDeclStmt` to reflect the fact that
* as of Java 16 interfaces can also be declared locally, not just classes.
*/
deprecated class LocalClassDeclStmt = LocalTypeDeclStmt;

/** An explicit `this(...)` constructor invocation. */
class ThisConstructorInvocationStmt extends Stmt, ConstructorCall, @constructorinvocationstmt {
/** Gets an argument of this constructor invocation. */
Expand Down
6 changes: 0 additions & 6 deletions java/ql/lib/semmle/code/java/Type.qll
Original file line number Diff line number Diff line change
Expand Up @@ -828,12 +828,6 @@ class LocalClassOrInterface extends NestedType, ClassOrInterface {
/** Gets the statement that declares this local class. */
LocalTypeDeclStmt getLocalTypeDeclStmt() { isLocalClassOrInterface(this, result) }

/**
* DEPRECATED: renamed `getLocalTypeDeclStmt` to reflect the fact that
* as of Java 16 interfaces can also be declared locally.
*/
deprecated LocalTypeDeclStmt getLocalClassDeclStmt() { result = this.getLocalTypeDeclStmt() }

override string getAPrimaryQlClass() { result = "LocalClassOrInterface" }
}

Expand Down

0 comments on commit a4e5d75

Please sign in to comment.