mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Java: exclude overloads of finalize
This commit is contained in:
@@ -1,2 +1 @@
|
||||
| Test.java:4:9:4:23 | finalize(...) | Call to 'finalize'. |
|
||||
| Test.java:25:9:25:33 | finalize(...) | Call to 'finalize'. |
|
||||
| Test.java:4:9:4:23 | finalize(...) | Call to 'finalize()'. |
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Test {
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
// COMPLIANT: If a subclass overrides `finalize`
|
||||
// COMPLIANT: If a subclass overrides `finalize()`
|
||||
// it must invoke the superclass finalizer explicitly.
|
||||
super.finalize();
|
||||
}
|
||||
@@ -20,9 +20,9 @@ public class Test {
|
||||
System.out.println(s);
|
||||
}
|
||||
|
||||
// NON_COMPLIANT: call to overload of `finalize`
|
||||
// COMPLIANT: call to overload of `finalize`
|
||||
void f2() throws Throwable {
|
||||
this.finalize("overload"); // $ Alert
|
||||
this.finalize("overload");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user