Skip to content

Commit caf21a8

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: update qhelp and add 'performace' tag
1 parent 3631df0 commit caf21a8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

java/ql/src/Violations of Best Practice/Undesirable Calls/DoNotCallFinalize.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Overview
22

3-
Calling `finalize()` in application code may cause inconsistent program state or unpredicatable behavior.
3+
Triggering garbage collection by directly calling `finalize()` may either have no effect or may trigger unnecessary garbage collection, leading to erratic behavior, performance issues, or deadlock.
44

55
## Recommendation
66

@@ -23,5 +23,6 @@ This rule is focused on the use of existing `finalize()` invocations rather than
2323

2424
## References
2525

26-
- Carnegie Mellon University, SEI CERT Oracle Coding Standard for Java: [MET12-J. Do not use finalizers](https://wiki.sei.cmu.edu/confluence/display/java/MET12-J.+Do+not+use+finalizers).
26+
- SEI CERT Oracle Coding Standard for Java: [MET12-J. Do not use finalizers](https://wiki.sei.cmu.edu/confluence/display/java/MET12-J.+Do+not+use+finalizers).
27+
- Java API Specification: [Object.finalize()](https://docs.oracle.com/javase/10/docs/api/java/lang/Object.html#finalize()).
2728
- Common Weakness Enumeration: [CWE-586](https://cwe.mitre.org/data/definitions/586).

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
* @problem.severity error
1010
* @tags quality
1111
* correctness
12+
* performance
1213
* external/cwe/cwe-586
1314
*/
1415

0 commit comments

Comments
 (0)