From bca2c2da548d6918ce6d9fde1dac2a41a4331f87 Mon Sep 17 00:00:00 2001 From: Jami Cogswell Date: Sat, 19 Jul 2025 19:29:00 -0400 Subject: [PATCH] Java: Add 'previous-id' and adjust tags for 'java/garbage-collection' and 'java/do-not-use-finalizers' --- .../query-suite/java-code-quality-extended.qls.expected | 1 + .../Undesirable Calls/CallsToRunFinalizersOnExit.ql | 7 +++++-- .../Undesirable Calls/GarbageCollection.ql | 6 ++++-- java/ql/src/change-notes/2025-07-19-adjust-tags.md | 5 +++++ 4 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 java/ql/src/change-notes/2025-07-19-adjust-tags.md diff --git a/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected b/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected index 7a1a986b2aa1..4a7364379953 100644 --- a/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected +++ b/java/ql/integration-tests/java/query-suite/java-code-quality-extended.qls.expected @@ -80,6 +80,7 @@ ql/java/ql/src/Violations of Best Practice/Naming Conventions/LocalShadowsFieldC ql/java/ql/src/Violations of Best Practice/Naming Conventions/SameNameAsSuper.ql ql/java/ql/src/Violations of Best Practice/Records/IgnoredSerializationMembersOfRecordClass.ql ql/java/ql/src/Violations of Best Practice/SpecialCharactersInLiterals/NonExplicitControlAndWhitespaceCharsInLiterals.ql +ql/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToRunFinalizersOnExit.ql ql/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToStringToString.ql ql/java/ql/src/Violations of Best Practice/Undesirable Calls/DefaultToString.ql ql/java/ql/src/Violations of Best Practice/Undesirable Calls/DoNotCallFinalize.ql diff --git a/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToRunFinalizersOnExit.ql b/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToRunFinalizersOnExit.ql index c2ffe45b5209..568be1805e66 100644 --- a/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToRunFinalizersOnExit.ql +++ b/java/ql/src/Violations of Best Practice/Undesirable Calls/CallsToRunFinalizersOnExit.ql @@ -7,8 +7,11 @@ * @problem.severity error * @precision medium * @id java/run-finalizers-on-exit - * @tags reliability - * maintainability + * @previous-id java/do-not-use-finalizers + * @tags quality + * reliability + * correctness + * performance */ import java diff --git a/java/ql/src/Violations of Best Practice/Undesirable Calls/GarbageCollection.ql b/java/ql/src/Violations of Best Practice/Undesirable Calls/GarbageCollection.ql index 1067bdcb6dce..620177cc58c6 100644 --- a/java/ql/src/Violations of Best Practice/Undesirable Calls/GarbageCollection.ql +++ b/java/ql/src/Violations of Best Practice/Undesirable Calls/GarbageCollection.ql @@ -6,8 +6,10 @@ * @problem.severity recommendation * @precision low * @id java/garbage-collection - * @tags reliability - * maintainability + * @previous-id java/do-not-use-finalizers + * @tags quality + * reliability + * correctness */ import java diff --git a/java/ql/src/change-notes/2025-07-19-adjust-tags.md b/java/ql/src/change-notes/2025-07-19-adjust-tags.md new file mode 100644 index 000000000000..0067adebdaf7 --- /dev/null +++ b/java/ql/src/change-notes/2025-07-19-adjust-tags.md @@ -0,0 +1,5 @@ +--- +category: queryMetadata +--- +* The tag `maintainability` has been removed from `java/run-finalizers-on-exit` and the tags `quality`, `correctness`, and `performance` have been added. +* The tag `maintainability` has been removed from `java/garbage-collection` and the tags `quality` and `correctness` have been added.