Skip to content

Commit e3e8f3d

Browse files
committed
Java: delete various outdated deprecations
1 parent 689eda4 commit e3e8f3d

File tree

5 files changed

+0
-64
lines changed

5 files changed

+0
-64
lines changed

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,6 @@ class Annotation extends @annotation, Expr {
4646
result = this.getType().getAnnotationElement(name)
4747
}
4848

49-
/**
50-
* DEPRECATED: Getting the value of _any_ annotation element is error-prone because
51-
* it could lead to selecting the value of the wrong element by accident (for example
52-
* when an annotation type is extended in the future). Prefer the predicate `getValue(string)`
53-
* and explicitly specify the element name. Use `getValue(_)` if it is really desired to
54-
* get the value of any element.
55-
*
56-
* Gets a value of an annotation element. This includes default values in case
57-
* no explicit value is specified. For elements with an array value type this
58-
* might have an `ArrayInit` as result. To properly handle array values, prefer
59-
* the predicate `getAnArrayValue`.
60-
*/
61-
deprecated Expr getAValue() { filteredAnnotValue(this, _, result) }
62-
6349
/**
6450
* Gets the value of the annotation element with the specified `name`.
6551
* This includes default values in case no explicit value is specified.
@@ -157,11 +143,6 @@ class Annotation extends @annotation, Expr {
157143
*/
158144
Expr getAnArrayValue(string name) { result = this.getArrayValue(name, _) }
159145

160-
/**
161-
* DEPRECATED: Predicate has been renamed to `getAnArrayValue`
162-
*/
163-
deprecated Expr getAValue(string name) { result = this.getAnArrayValue(name) }
164-
165146
/**
166147
* Gets a value of the annotation element with the specified `name`, which must be declared as an enum
167148
* type array. This includes default values in case no explicit value is specified.

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,6 @@ class LongLiteral extends Literal, @longliteral {
609609
override string getAPrimaryQlClass() { result = "LongLiteral" }
610610
}
611611

612-
/** DEPRECATED: Alias for FloatLiteral */
613-
deprecated class FloatingPointLiteral = FloatLiteral;
614-
615612
/**
616613
* A float literal. For example, `4.2f`.
617614
*

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ class OverrideAnnotation extends Annotation {
1818
class SuppressWarningsAnnotation extends Annotation {
1919
SuppressWarningsAnnotation() { this.getType().hasQualifiedName("java.lang", "SuppressWarnings") }
2020

21-
/**
22-
* DEPRECATED: This predicate restricts the results to `StringLiteral`; prefer `getASuppressedWarning()`
23-
* to get the name of a suppressed warning.
24-
*
25-
* Gets the `StringLiteral` of a warning suppressed by this annotation.
26-
*/
27-
deprecated StringLiteral getASuppressedWarningLiteral() { result = this.getAnArrayValue("value") }
28-
2921
/** Gets the name of a warning suppressed by this annotation. */
3022
string getASuppressedWarning() { result = this.getAStringArrayValue("value") }
3123
}
@@ -34,17 +26,6 @@ class SuppressWarningsAnnotation extends Annotation {
3426
class TargetAnnotation extends Annotation {
3527
TargetAnnotation() { this.getType().hasQualifiedName("java.lang.annotation", "Target") }
3628

37-
/**
38-
* DEPRECATED: Getting the field access expression is rarely useful. Use `getATargetElementType()`
39-
* to get the name of the target element.
40-
*
41-
* Gets a target expression within this annotation.
42-
*
43-
* For example, the field access `ElementType.FIELD` is a target expression in
44-
* `@Target({ElementType.FIELD, ElementType.METHOD})`.
45-
*/
46-
deprecated Expr getATargetExpression() { result = this.getAnArrayValue("value") }
47-
4829
/**
4930
* Gets the name of a target element type.
5031
*
@@ -58,17 +39,6 @@ class TargetAnnotation extends Annotation {
5839
class RetentionAnnotation extends Annotation {
5940
RetentionAnnotation() { this.getType().hasQualifiedName("java.lang.annotation", "Retention") }
6041

61-
/**
62-
* DEPRECATED: Getting the field access expression is rarely useful. Use `getRetentionPolicy()`
63-
* to get the name of the retention policy.
64-
*
65-
* Gets the retention policy expression within this annotation.
66-
*
67-
* For example, the field access `RetentionPolicy.RUNTIME` is the
68-
* retention policy expression in `@Retention(RetentionPolicy.RUNTIME)`.
69-
*/
70-
deprecated Expr getRetentionPolicyExpression() { result = this.getValue("value") }
71-
7242
/**
7343
* Gets the name of the retention policy of this annotation.
7444
*

java/ql/lib/semmle/code/java/controlflow/internal/Preconditions.qll

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,6 @@ private predicate condtionCheckMethodTestingFramework(Method m, int argument, bo
9696
)
9797
}
9898

99-
/**
100-
* DEPRECATED: Use `conditionCheckArgument` instead.
101-
* Holds if `ma` is an access to a non-overridable method that checks that its
102-
* first argument is equal to `checkTrue` and throws otherwise.
103-
*/
104-
deprecated predicate conditionCheck(MethodAccess ma, boolean checkTrue) {
105-
conditionCheckArgument(ma, 0, checkTrue)
106-
}
107-
10899
/**
109100
* Holds if `ma` is an access to a non-overridable method that checks that its
110101
* zero-indexed `argument` is equal to `checkTrue` and throws otherwise.

java/ql/src/Telemetry/ExternalApi.qll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ class ExternalApi extends Callable {
9090
}
9191
}
9292

93-
/** DEPRECATED: Alias for ExternalApi */
94-
deprecated class ExternalAPI = ExternalApi;
95-
9693
/**
9794
* Gets the limit for the number of results produced by a telemetry query.
9895
*/

0 commit comments

Comments
 (0)