Skip to content

Don't print stack trace.#7785

Merged
mernst merged 1 commit into
typetools:masterfrom
smillst:issue7784
Jul 2, 2026
Merged

Don't print stack trace.#7785
mernst merged 1 commit into
typetools:masterfrom
smillst:issue7784

Conversation

@smillst

@smillst smillst commented Jul 1, 2026

Copy link
Copy Markdown
Member

Fixes #7784.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: efdaf780-f599-4a20-9030-51fd07f736c4

📥 Commits

Reviewing files that changed from the base of the PR and between 5e7bf5e and 46ecd93.

📒 Files selected for processing (1)
  • javacutil/src/main/java/org/checkerframework/javacutil/AnnotationBuilder.java
💤 Files with no reviewable changes (1)
  • javacutil/src/main/java/org/checkerframework/javacutil/AnnotationBuilder.java

📝 Walkthrough

Walkthrough

This change removes a debug statement in AnnotationBuilder.fromClass that unconditionally printed a stack trace to standard error when an annotation class could not be loaded. The subsequent UserError throw for the missing annotation remains unchanged. No public or exported API declarations were altered.

Changes

File Change Summary
javacutil/.../AnnotationBuilder.java Removed debug new Error("Backtrace:").printStackTrace() call from the annotation-load failure path in fromClass.

Sequence Diagram(s)

Not applicable; this change removes a diagnostic print statement without altering control flow or component interactions.

Related issues: #7784 — Removes the noisy backtrace output described in the issue, which is printed to System.err when an annotation class cannot be found on the annotation processor's class path.

Suggested labels: bug, low-risk, javacutil

Suggested reviewers: wmdietl, smillst

🐰 A backtrace once cluttered the console with dread,
Now silently the UserError speaks instead,
One line removed, the noise is gone,
Compilation logs now cleaner shine on,
A tiny hop, a tidy fix ahead.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change removes the extra stack trace and preserves the existing UserError path, matching issue #7784.
Out of Scope Changes check ✅ Passed The PR is narrowly scoped to AnnotationBuilder's noisy backtrace removal and introduces no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mernst mernst merged commit e728b4e into typetools:master Jul 2, 2026
36 checks passed
@mernst mernst deleted the issue7784 branch July 2, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Noisy System.err output from AnnotationBuilder

2 participants