Repository navigation
ref(android): Remove deprecated io.sentry.android.core.LoadClass - #6594
Merged
Merged
Conversation
Use io.sentry.util.LoadClass instead. The Android shim was deprecated in Co-Authored-By: Alexander Dinauer <alexander.dinauer@sentry.io> #3460 and nothing in the SDK uses it anymore.
adinauer
marked this pull request as ready for review
November 12, 2026 11:18
adinauer
requested review from
markushi and
runningcode
and removed request for
a team
November 12, 2026 11:18
3 of 9 tasks
…d-android-loadclass
📲 Install BuildsAndroid
|
1 of 3 tasks
adinauer
added a commit
to getsentry/sentry-docs
that referenced
this pull request
Nov 12, 2026
## DESCRIBE YOUR PR Document the removal of the deprecated `io.sentry.android.core.LoadClass` shim in the Android v8-to-v9 migration guide. The guidance tells users to replace imports of the removed Android class with `io.sentry.util.LoadClass`, which provides the same constructor and methods. This PR targets the `java-v9` collection branch so the migration guidance publishes with SDK v9. Refs getsentry/sentry-java#6594 ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Removes the deprecated
io.sentry.android.core.LoadClassshim.io.sentry.util.LoadClasshas the same methods and can be dropped in as a replacement.sentry-android-core/.../LoadClass.java. It extendedio.sentry.util.LoadClassand forwardedloadClass/isClassAvailableto a separate delegate instance.AndroidOptionsInitializer,SentryAndroidandUserInteractionIntegrationhad to spell outio.sentry.util.LoadClassbecause the shim shadowed the name insideio.sentry.android.core. They now import it instead.io.sentry.android.corepackage silently resolvedLoadClass()/mock<LoadClass>()to the deprecated shim. They now importio.sentry.util.LoadClass.sentry-android-core.apiwas regenerated.💡 Motivation and Context
The shim was deprecated in #3460 (June 2024, before 8.0) in favor of
io.sentry.util.LoadClass. No SDK production code uses it anymore. Since 9.0 is a major release, this is a good time to remove it.Hybrid SDKs:
sentry-react-nativealready usesio.sentry.util.LoadClass. GitHub code search found no references toio.sentry.android.core.LoadClassinsentry-dart,sentry-unity,sentry-capacitor,sentry-kotlin-multiplatform,sentry-unrealorsentry-dotnet. Code search isn't exhaustive, so this is worth a quick double-check.💚 How did you test it?
./gradlew :sentry-android-core:spotlessApply :sentry-android-core:updateKotlinAbipassed. It compiles main sources; the.apidiff only drops the shim class.sentry-android-coreunit tests locally, so I'm relying on CI. The test changes are imports only.9.x.xdidn't compile (SentryTracerstill calledspan.getOptions()). That was fixed in fix(core): Fix 9.x.x compile error in SentryTracer.hasAllChildrenFinished #6595. This branch now includes the latest9.x.x(4066c5e), and CI is re-running.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
via alexander.dinauer.
--
View Session [Sentry]