Skip to content

Commit 44445db

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: minor refactor
1 parent dd57d1a commit 44445db

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

java/ql/src/Violations of Best Practice/Undesirable Calls/DoNotUseFinalize.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313

1414
import java
1515

16-
from MethodCall mc, Method m
16+
from MethodCall mc
1717
where
18-
mc.getMethod() = m and
19-
m.hasName("finalize") and
18+
mc.getMethod().hasName("finalize") and
2019
// The Java documentation for `finalize` states: "If a subclass overrides
2120
// `finalize` it must invoke the superclass finalizer explicitly". Therefore,
2221
// we do not alert on `super.finalize` calls that occur within a callable

0 commit comments

Comments
 (0)