Skip to content

Java: Restrict results to source literals.#20054

Merged
aschackmull merged 1 commit intogithub:mainfrom
aschackmull:java/fixup-control-char-query
Jul 15, 2025
Merged

Java: Restrict results to source literals.#20054
aschackmull merged 1 commit intogithub:mainfrom
aschackmull:java/fixup-control-char-query

Conversation

@aschackmull
Copy link
Copy Markdown
Contributor

Some literals extracted from .class files can contain many control chars, which can cause this query to blow up. Those results are pretty useless, so we can simply exclude them.

Copilot AI review requested due to automatic review settings July 15, 2025 12:56
@aschackmull aschackmull added the no-change-note-required This PR does not need a change note label Jul 15, 2025
@aschackmull aschackmull requested a review from a team as a code owner July 15, 2025 12:56
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR restricts a CodeQL query to only analyze source literals rather than compiled bytecode literals. The change addresses performance issues caused by literals extracted from .class files that contain many control characters, which can cause the query to become inefficient while providing limited value.

  • Adds a filter to restrict analysis to source compilation units only
  • Adds documentation explaining why Kotlin files are excluded to prevent false positives

@github-actions github-actions Bot added the Java label Jul 15, 2025
@aschackmull aschackmull merged commit b13f118 into github:main Jul 15, 2025
18 checks passed
@aschackmull aschackmull deleted the java/fixup-control-char-query branch July 15, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants