Skip to content

Commit 44cc514

Browse files
committed
Java: Delete old deprecated code.
1 parent a473fdb commit 44cc514

27 files changed

Lines changed: 20 additions & 641 deletions

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,11 +2732,6 @@ class PatternExpr extends Expr {
27322732
*/
27332733
LocalVariableDeclExpr asBindingOrUnnamedPattern() { result = this }
27342734

2735-
/**
2736-
* DEPRECATED: alias for `asBindingOrUnnamedPattern`.
2737-
*/
2738-
deprecated LocalVariableDeclExpr asBindingPattern() { result = this.asBindingOrUnnamedPattern() }
2739-
27402735
/**
27412736
* Gets this pattern cast to a record pattern.
27422737
*/

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -810,14 +810,6 @@ class Field extends Member, ExprParent, @field, Variable {
810810
)
811811
}
812812

813-
/**
814-
* DEPRECATED: The result is always `this`.
815-
*/
816-
deprecated Field getSourceDeclaration() { result = this }
817-
818-
/** DEPRECATED: This always holds. */
819-
deprecated predicate isSourceDeclaration() { any() }
820-
821813
override predicate isPublic() {
822814
Member.super.isPublic()
823815
or

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,11 +558,6 @@ class ConstCase extends SwitchCase {
558558
class PatternCase extends SwitchCase {
559559
PatternCase() { exists(PatternExpr pe | pe.isNthChildOf(this, _)) }
560560

561-
/**
562-
* DEPRECATED: alias for getPattern(0)
563-
*/
564-
deprecated PatternExpr getPattern() { result = this.getPattern(0) }
565-
566561
/**
567562
* Gets this case's `n`th pattern.
568563
*/

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,6 @@ class RefType extends Type, Annotatable, Modifiable, @reftype {
637637
this.(NestedType).getEnclosingType().getNestedName() + "$" + this.getName() = result
638638
}
639639

640-
/** DEPRECATED: Alias for `getNestedName`. */
641-
deprecated string nestedName() { result = this.getNestedName() }
642-
643640
/**
644641
* Gets the source declaration of this type.
645642
*

java/ql/lib/semmle/code/java/controlflow/Dominance.qll

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,12 @@ import java
1010
* Predicates for basic-block-level dominance.
1111
*/
1212

13-
/**
14-
* DEPRECATED: Use `BasicBlock::immediatelyDominates` instead.
15-
*
16-
* The immediate dominance relation for basic blocks.
17-
*/
18-
deprecated predicate bbIDominates(BasicBlock dom, BasicBlock node) {
19-
dom.immediatelyDominates(node)
20-
}
21-
2213
/** Exit points for basic-block control-flow. */
2314
private predicate bbSink(BasicBlock exit) { exit.getLastNode() instanceof ControlFlow::ExitNode }
2415

2516
/** Reversed `bbSucc`. */
2617
private predicate bbPred(BasicBlock post, BasicBlock pre) { post = pre.getASuccessor() }
2718

28-
/** The immediate post-dominance relation on basic blocks. */
29-
deprecated predicate bbIPostDominates(BasicBlock dominator, BasicBlock node) =
30-
idominance(bbSink/1, bbPred/2)(_, dominator, node)
31-
32-
/**
33-
* DEPRECATED: Use `BasicBlock::strictlyDominates` instead.
34-
*
35-
* Holds if `dom` strictly dominates `node`.
36-
*/
37-
deprecated predicate bbStrictlyDominates(BasicBlock dom, BasicBlock node) {
38-
dom.strictlyDominates(node)
39-
}
40-
41-
/**
42-
* DEPRECATED: Use `BasicBlock::dominates` instead.
43-
*
44-
* Holds if `dom` dominates `node`. (This is reflexive.)
45-
*/
46-
deprecated predicate bbDominates(BasicBlock dom, BasicBlock node) { dom.dominates(node) }
47-
48-
/**
49-
* DEPRECATED: Use `BasicBlock::strictlyPostDominates` instead.
50-
*
51-
* Holds if `dom` strictly post-dominates `node`.
52-
*/
53-
deprecated predicate bbStrictlyPostDominates(BasicBlock dom, BasicBlock node) {
54-
dom.strictlyPostDominates(node)
55-
}
56-
57-
/**
58-
* DEPRECATED: Use `BasicBlock::postDominates` instead.
59-
*
60-
* Holds if `dom` post-dominates `node`. (This is reflexive.)
61-
*/
62-
deprecated predicate bbPostDominates(BasicBlock dom, BasicBlock node) { dom.postDominates(node) }
63-
6419
/**
6520
* The dominance frontier relation for basic blocks.
6621
*

java/ql/lib/semmle/code/java/dataflow/FlowSources.qll

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,6 @@ abstract class SourceNode extends DataFlow::Node {
4343
abstract string getThreatModel();
4444
}
4545

46-
/**
47-
* DEPRECATED: Use `ActiveThreatModelSource` instead.
48-
*
49-
* A class of data flow sources that respects the
50-
* current threat model configuration.
51-
*/
52-
deprecated class ThreatModelFlowSource = ActiveThreatModelSource;
53-
5446
/**
5547
* A data flow source that is enabled in the current threat model configuration.
5648
*/

java/ql/lib/semmle/code/java/dataflow/FlowSummary.qll

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ import java
88
private import internal.FlowSummaryImpl as Impl
99
private import internal.DataFlowUtil
1010

11-
deprecated class SummaryComponent = Impl::Private::SummaryComponent;
12-
13-
deprecated module SummaryComponent = Impl::Private::SummaryComponent;
14-
15-
deprecated class SummaryComponentStack = Impl::Private::SummaryComponentStack;
16-
17-
deprecated module SummaryComponentStack = Impl::Private::SummaryComponentStack;
18-
1911
/** A synthetic callable with a set of concrete call sites and a flow summary. */
2012
abstract class SyntheticCallable extends string {
2113
bindingset[this]
@@ -147,5 +139,3 @@ private class SummarizedSyntheticCallableAdapter extends SummarizedCallable::Ran
147139
)
148140
}
149141
}
150-
151-
deprecated class RequiredSummaryComponentStack = Impl::Private::RequiredSummaryComponentStack;

java/ql/lib/semmle/code/java/dataflow/NullGuards.qll

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -196,18 +196,6 @@ Expr basicNullGuard(Expr e, boolean branch, boolean isnull) {
196196
Guards_v3::nullGuard(result, any(GuardValue v | v.asBooleanValue() = branch), e, isnull)
197197
}
198198

199-
/**
200-
* DEPRECATED: Use `basicNullGuard` instead.
201-
*
202-
* Gets an expression that directly tests whether a given expression, `e`, is null or not.
203-
*
204-
* If `result` evaluates to `branch`, then `e` is guaranteed to be null if `isnull`
205-
* is true, and non-null if `isnull` is false.
206-
*/
207-
deprecated Expr basicOrCustomNullGuard(Expr e, boolean branch, boolean isnull) {
208-
result = basicNullGuard(e, branch, isnull)
209-
}
210-
211199
/**
212200
* Gets an expression that directly tests whether a given SSA variable is null or not.
213201
*
@@ -218,18 +206,6 @@ Expr directNullGuard(SsaDefinition v, boolean branch, boolean isnull) {
218206
result = basicNullGuard(sameValue(v, _), branch, isnull)
219207
}
220208

221-
/**
222-
* DEPRECATED: Use `nullGuardControls`/`nullGuardControlsBranchEdge` instead.
223-
*
224-
* Gets a `Guard` that tests (possibly indirectly) whether a given SSA variable is null or not.
225-
*
226-
* If `result` evaluates to `branch`, then `v` is guaranteed to be null if `isnull`
227-
* is true, and non-null if `isnull` is false.
228-
*/
229-
deprecated Guard nullGuard(SsaDefinition v, boolean branch, boolean isnull) {
230-
result = directNullGuard(v, branch, isnull)
231-
}
232-
233209
/**
234210
* Holds if there exists a null check on `v`, such that taking the branch edge
235211
* from `bb1` to `bb2` implies that `v` is guaranteed to be null if `isnull` is

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowNodes.qll

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,19 +198,6 @@ module Public {
198198
or
199199
result = this.getType() and not exists(this.getImprovedTypeBound())
200200
}
201-
202-
/**
203-
* Holds if this element is at the specified location.
204-
* The location spans column `startcolumn` of line `startline` to
205-
* column `endcolumn` of line `endline` in file `filepath`.
206-
* For more information, see
207-
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
208-
*/
209-
deprecated predicate hasLocationInfo(
210-
string filepath, int startline, int startcolumn, int endline, int endcolumn
211-
) {
212-
this.getLocation().hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
213-
}
214201
}
215202

216203
/**

java/ql/lib/semmle/code/java/frameworks/Jndi.qll

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ class MethodLdapNameAddAll extends Method {
4848
}
4949
}
5050

51-
/**
52-
* DEPRECATED: No longer needed as clone steps are handled uniformly.
53-
*
54-
* A method with the name `clone` declared in `javax.naming.ldap.LdapName`.
55-
*/
56-
deprecated class MethodLdapNameClone extends Method {
57-
MethodLdapNameClone() {
58-
this.getDeclaringType() instanceof TypeLdapName and
59-
this.hasName("clone")
60-
}
61-
}
62-
6351
/** A method with the name `getAll` declared in `javax.naming.ldap.LdapName`. */
6452
class MethodLdapNameGetAll extends Method {
6553
MethodLdapNameGetAll() {

0 commit comments

Comments
 (0)