Skip to content

Commit 7883124

Browse files
committed
Java: getSourceDeclaration() and getASourceSupertype*() commute and this yields much better join-order.
1 parent 1273252 commit 7883124

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/src/Likely Bugs/Collections/ContainsTypeMismatch.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ class MismatchedContainerAccess extends MethodCall {
103103
|
104104
this.getCallee()
105105
.getDeclaringType()
106-
.getASourceSupertype*()
107106
.getSourceDeclaration()
107+
.getASourceSupertype*()
108108
.hasQualifiedName(package, type) and
109109
this.getCallee().getParameter(i).getType() instanceof TypeObject
110110
)
@@ -119,7 +119,7 @@ class MismatchedContainerAccess extends MethodCall {
119119
containerAccess(package, type, p, this.getCallee().getSignature(), i)
120120
|
121121
t = this.getCallee().getDeclaringType() and
122-
t.getASourceSupertype*().getSourceDeclaration() = g and
122+
t.getSourceDeclaration().getASourceSupertype*() = g and
123123
g.hasQualifiedName(package, type) and
124124
indirectlyInstantiates(t, g, p, result)
125125
)

0 commit comments

Comments
 (0)