Java: Deprecate UnreachableBlocks.#21317
Merged
aschackmull merged 1 commit intogithub:mainfrom Feb 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR deprecates the Java UnreachableBlocks control-flow library (which is described as unused/outdated relative to upcoming CFG changes) and removes the associated library test.
Changes:
- Removed the
unreachableblockslibrary-test query, Java fixture, and expected results. - Marked
semmle.code.java.controlflow.UnreachableBlocks(and its helper module) as deprecated with a QLDoc deprecation notice. - Added a Java library change-note entry documenting the deprecation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| java/ql/test/library-tests/unreachableblocks/unreachableblocks/Unreachable.java | Removes the Java fixture used by the unreachable-blocks library test. |
| java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.ql | Removes the library-test query that exercised UnreachableBlocks. |
| java/ql/test/library-tests/unreachableblocks/UnreachableBlocks.expected | Removes the expected results for the deleted library-test query. |
| java/ql/lib/semmle/code/java/controlflow/unreachableblocks/ExcludeDebuggingProfilingLogging.qll | Marks the helper module as deprecated and adds a deprecation notice. |
| java/ql/lib/semmle/code/java/controlflow/UnreachableBlocks.qll | Marks the main library module as deprecated and adds a deprecation notice. |
| java/ql/lib/change-notes/2026-02-12-deprecate-unreachableblocks.md | Adds a change-note documenting the deprecation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This library is unused and that has perhaps always been the case, so let's get rid of it. I've traced its origins back to 2016 and its introduction was given two motivations:
The former has since been implemented separately, and as for the latter, we have dead code queries with a slightly different and likely better focus - I don't think unreachable parts of the CFG would be a useful addition there.
Keeping this around would involve updating it to the upcoming CFG revision, which I don't think is worth the effort.