Skip to content

Report ReTrace output errors to callers - #549

Open
gztong666 wants to merge 1 commit into
Guardsquare:masterfrom
gztong666:fix/report-retrace-output-errors
Open

gztong666 wants to merge 1 commit into
Guardsquare:masterfrom
gztong666:fix/report-retrace-output-errors

Conversation

@gztong666

Copy link
Copy Markdown

PrintWriter records write and flush failures instead of throwing them. ReTrace only flushes, so the caller and command-line entry point can report success even when no de-obfuscated output was written. Check the writer status after the last line and report it using the existing IOException path.

Compiled ReTrace with JDK 17 and exercised its public retrace method against the upstream and patched classes. Normal translation produced the same mapped frame. A writer failing during either write or flush returned normally upstream and raised the new IOException with the patch.

OpenAI Codex assisted with the patch and verification.

@sonarqubecloud

sonarqubecloud Bot commented Dec 5, 2026

Copy link
Copy Markdown

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.

1 participant