Skip to content

Commit 2e8952c

Browse files
committed
Fix java/non-final-call-in-constructor regression
1 parent dc163b5 commit 2e8952c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/ql/src/Likely Bugs/Inheritance/NoNonFinalInConstructor.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ where
4747
ma = unqualifiedCallToNonAbstractMethod(c, m) and
4848
// ... there exists an overriding method in a subtype,
4949
n.overrides+(m) and
50-
n.getDeclaringType().getAStrictAncestor() = c.getDeclaringType() and
50+
n.getDeclaringType().getAStrictAncestorI() = c.getDeclaringType() and
5151
// ... the method is in a supertype of c,
5252
m.getDeclaringType() = c.getDeclaringType().getAnAncestor() and
5353
// ... `n` reads a non-final field `f`,
5454
fa = nonFinalFieldRead(n, f) and
5555
// ... which is declared in a subtype of `c`,
56-
f.getDeclaringType().getAStrictAncestor() = c.getDeclaringType() and
56+
f.getDeclaringType().getAStrictAncestorI() = c.getDeclaringType() and
5757
// ... `f` is written only in the subtype constructor, and
5858
fw = fieldWriteOnlyIn(d, f) and
5959
// ... the subtype constructor calls (possibly indirectly) the offending super constructor.

0 commit comments

Comments
 (0)