Skip to content

repro(android): demonstrate R8 throwable class merging - #53

Draft
sentry-junior[bot] wants to merge 2 commits into
mainfrom
repro/sentry-java-r8-throwable-class-merging
Draft

repro(android): demonstrate R8 throwable class merging#53
sentry-junior[bot] wants to merge 2 commits into
mainfrom
repro/sentry-java-r8-throwable-class-merging

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Jul 28, 2026

Copy link
Copy Markdown

Summary

Adds a minimal, customer-neutral Android project demonstrating that AGP 9.2.1 / R8 can merge two custom RuntimeException subclasses into one residual runtime class.

The generated mapping preserves the second exception's constructor as an inlined frame, while Throwable#getClass().getName() observes only the surviving residual class. This reproduces the exception-type / constructor-frame mismatch relevant to crash reporting.

Verification

  • :app:clean :app:assembleRelease passes with JDK 17, Gradle 9.4.1, Android SDK 36, and AGP 9.2.1.
  • Without a keep rule, the mapping contains only DiagnosticTestException -> a; ExampleNonFatal.<init> appears as an inlined frame.
  • With -keep,allowshrinking,allowobfuscation class * extends java.lang.Throwable, the mapping contains distinct residual classes for both throwables.
  • git diff --cached --check passes.

Notes

No customer names, source code, event data, or Sentry credentials are included.

Requested by Roman Zavarnitsyn via Junior.

--

View Junior Session

sentry-junior Bot and others added 2 commits July 28, 2026 08:15
Co-Authored-By: Roman Zavarnitsyn <roman.zavarnitsyn@sentry.io>
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