Skip to content

Commit 2ce0921

Browse files
committed
Java: Clean up SpringHttp.qll
1 parent 2ae15f9 commit 2ce0921

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed
Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,35 @@
11
import java
22

3+
/** The class `org.springframework.http.HttpEntity` or an instantiation of it. */
34
class SpringHttpEntity extends Class {
45
SpringHttpEntity() {
5-
getSourceDeclaration()
6-
.getErasure()
7-
.(RefType)
8-
.hasQualifiedName("org.springframework.http", "HttpEntity")
6+
this.getSourceDeclaration().hasQualifiedName("org.springframework.http", "HttpEntity")
97
}
108
}
119

10+
/** The class `org.springframework.http.RequestEntity` or an instantiation of it. */
1211
class SpringRequestEntity extends Class {
1312
SpringRequestEntity() {
14-
getSourceDeclaration()
15-
.getErasure()
16-
.(RefType)
17-
.hasQualifiedName("org.springframework.http", "RequestEntity")
13+
this.getSourceDeclaration().hasQualifiedName("org.springframework.http", "RequestEntity")
1814
}
1915
}
2016

17+
/** The class `org.springframework.http.ResponseEntity` or an instantiation of it. */
2118
class SpringResponseEntity extends Class {
2219
SpringResponseEntity() {
23-
getSourceDeclaration()
24-
.getErasure()
25-
.(RefType)
26-
.hasQualifiedName("org.springframework.http", "ResponseEntity")
20+
this.getSourceDeclaration().hasQualifiedName("org.springframework.http", "ResponseEntity")
2721
}
2822
}
2923

24+
/** The nested class `BodyBuilder` in `org.springframework.http.ResponseEntity`. */
3025
class SpringResponseEntityBodyBuilder extends Interface {
3126
SpringResponseEntityBodyBuilder() {
32-
getSourceDeclaration().getEnclosingType() = any(SpringResponseEntity sre) and
33-
hasName("BodyBuilder")
27+
this.getSourceDeclaration().getEnclosingType() instanceof SpringResponseEntity and
28+
this.hasName("BodyBuilder")
3429
}
3530
}
3631

32+
/** The class `org.springframework.http.HttpHeaders`. */
3733
class SpringHttpHeaders extends Class {
38-
SpringHttpHeaders() { hasQualifiedName("org.springframework.http", "HttpHeaders") }
39-
}
34+
SpringHttpHeaders() { this.hasQualifiedName("org.springframework.http", "HttpHeaders") }
35+
}

0 commit comments

Comments
 (0)