Repository navigation
ref(core): Drop the Java 9+ check now that the SDK requires Java 11 - #6792
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Alexander Dinauer <alexander.dinauer@sentry.io>
Contributor
PR risk: mediumFor commit Main concerns: public contract, reach. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
📲 Install BuildsAndroid
|
adinauer
marked this pull request as ready for review
November 26, 2026 13:57
adinauer
requested review from
markushi and
romtsn
and removed request for
a team
November 26, 2026 13:57
This branch has not been deployed
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
Platform.isJavaNinePlus()together with thejava.specification.versionparsing behind it. Its two callers now check onlyPlatform.isJvm():SentryAutoDateProviderusesSentryInstantDateProvideron the JVM andSentryNanotimeDateProvideron AndroidSystemEpochClockreadsInstanton the JVM andcurrentTimeMillison AndroidThe
SentryNanotimeDateJavadoc no longer describes it as a pre-Java 9 workaround.💡 Motivation and Context
Since #6459, 9.x compiles for Java 11, and the SDK can't load on Java 8 at all. On the JVM
isJavaNinePlusis therefore alwaystrue, and on Android it was already hard-coded tofalse. The Java 8 branches were dead code. What remained was a static initializer that parsed a system property inside a broadcatch (Throwable)on the startup path.Behavior only changes for a runtime that isn't detected as Android but reports a spec version below 9. Android itself reports
0.9, but it is detected throughjava.vendor. Such a runtime now getsInstantinstead of the nanotime fallback.Platformis@ApiStatus.Internal. The removed getter appears only insentry.api, so this has no changelog entry.#skip-changelog
via alexander.dinauer.
--
View Session [Sentry]