mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Java: Clean up deprecated overrides.
This commit is contained in:
@@ -151,33 +151,6 @@ class Container extends @container, Top {
|
||||
* This is the absolute path of the container.
|
||||
*/
|
||||
override string toString() { result = getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getAbsolutePath()`, `getBaseName()` or `getStem()` instead.
|
||||
*
|
||||
* Gets the name of this container.
|
||||
*/
|
||||
deprecated string getName() { result = getAbsolutePath() }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getBaseName()` or `getStem()` instead.
|
||||
*
|
||||
* The short name of this container, excluding its path and (for files) extension.
|
||||
*
|
||||
* For folders, the short name includes the extension (if any), so the short name
|
||||
* of the folder with absolute path `/home/user/.m2` is `.m2`.
|
||||
*/
|
||||
deprecated string getShortName() {
|
||||
folders(this, _, result) or
|
||||
files(this, _, result, _, _)
|
||||
}
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getAbsolutePath()` instead.
|
||||
*
|
||||
* Gets the full name of this container, including its path and extension (if any).
|
||||
*/
|
||||
deprecated string getFullName() { result = getAbsolutePath() }
|
||||
}
|
||||
|
||||
/** A folder. */
|
||||
@@ -198,13 +171,6 @@ class File extends Container, @file {
|
||||
|
||||
/** Gets the URL of this file. */
|
||||
override string getURL() { result = "file://" + this.getAbsolutePath() + ":0:0:0:0" }
|
||||
|
||||
/**
|
||||
* DEPRECATED: use `getAbsolutePath()`, `getBaseName()` or `getStem()` instead.
|
||||
*
|
||||
* Holds if this file has the specified `name`.
|
||||
*/
|
||||
deprecated predicate hasName(string name) { name = this.getAbsolutePath() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -117,7 +117,7 @@ class IfStmt extends ConditionalStmt, @ifstmt {
|
||||
* Gets the statement that is executed whenever the condition
|
||||
* of this branch statement evaluates to `true`.
|
||||
*/
|
||||
override Stmt getTrueSuccessor() { result = getThen() }
|
||||
deprecated override Stmt getTrueSuccessor() { result = getThen() }
|
||||
|
||||
/** Gets the `else` branch of this `if` statement. */
|
||||
Stmt getElse() { result.isNthChildOf(this, 2) }
|
||||
@@ -168,7 +168,7 @@ class ForStmt extends ConditionalStmt, @forstmt {
|
||||
* Gets the statement that is executed whenever the condition
|
||||
* of this branch statement evaluates to true.
|
||||
*/
|
||||
override Stmt getTrueSuccessor() { result = getStmt() }
|
||||
deprecated override Stmt getTrueSuccessor() { result = getStmt() }
|
||||
|
||||
/**
|
||||
* Gets a variable that is used as an iteration variable: it is defined,
|
||||
@@ -228,7 +228,7 @@ class WhileStmt extends ConditionalStmt, @whilestmt {
|
||||
* Gets the statement that is executed whenever the condition
|
||||
* of this branch statement evaluates to true.
|
||||
*/
|
||||
override Stmt getTrueSuccessor() { result = getStmt() }
|
||||
deprecated override Stmt getTrueSuccessor() { result = getStmt() }
|
||||
|
||||
/** Gets a printable representation of this statement. May include more detail than `toString()`. */
|
||||
override string pp() { result = "while (...) " + this.getStmt().pp() }
|
||||
@@ -249,7 +249,7 @@ class DoStmt extends ConditionalStmt, @dostmt {
|
||||
* Gets the statement that is executed whenever the condition
|
||||
* of this branch statement evaluates to `true`.
|
||||
*/
|
||||
override Stmt getTrueSuccessor() { result = getStmt() }
|
||||
deprecated override Stmt getTrueSuccessor() { result = getStmt() }
|
||||
|
||||
/** Gets a printable representation of this statement. May include more detail than `toString()`. */
|
||||
override string pp() { result = "do " + this.getStmt().pp() + " while (...)" }
|
||||
|
||||
Reference in New Issue
Block a user