Skip to content

Report the mapping file line when a ReTrace range is invalid - #550

Open
gztong666 wants to merge 1 commit into
Guardsquare:masterfrom
gztong666:fix/report-invalid-retrace-mapping-ranges
Open

gztong666 wants to merge 1 commit into
Guardsquare:masterfrom
gztong666:fix/report-invalid-retrace-mapping-ranges

Conversation

@gztong666

Copy link
Copy Markdown

An invalid numeric line range in a method mapping escapes MappingReader as a raw NumberFormatException. The standalone ReTrace command handles IOException for malformed input, so it currently prints a Java exception trace without identifying the line in the input file. Convert the malformed range to the existing IOException path and retain its cause. Parsing and callback execution remain separate.

Compiled the current MappingReader and ran the standalone ReTrace command on a correct mapping and on mappings with invalid original or obfuscated ranges. The correct mapping still translates the frame. The malformed files return status 1 with the mapping line number; upstream reports a raw NumberFormatException in both cases.

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