Repository navigation
ref(time): Read the epoch time from EpochClock (JAVA-836) - #6588
Merged
Merged
Conversation
📲 Install BuildsAndroid
|
The ApplicationExitInfo cutoff and okhttp's replay breadcrumb timestamps only need the current epoch time, which options.getEpochClock() gives. Moving them off CurrentDateProvider changes no values, and leaves fewer callers for v9 to touch when it removes ICurrentDateProvider. The three exit-info integrations no longer take a date provider: the dispatcher reads the clock from the options it already has. Timestamp.epochMillis() converts for the call sites that need millis. Fixes JAVA-836 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runningcode
force-pushed
the
no/java-836-epoch-clock-callers
branch
from
November 16, 2026 13:56
179af89 to
87e190c
Compare
runningcode
marked this pull request as ready for review
November 16, 2026 13:59
runningcode
requested review from
markushi and
romtsn
and removed request for
a team
November 16, 2026 13:59
adinauer
approved these changes
Nov 17, 2026
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
This PR just removes uses of
CurrentDateProviderand replaces them withoptions.getEpochClock(). There's no value or clock changing.Like so:
Why the values stay the same:
getEpochClock()is alwaysSystemEpochClock, which readsSystem.currentTimeMillis()on Android andInstant.now()on Java 9+. Both read the same system clock asCurrentDateProvider.Public API: unchanged. The removed constructors were package-private. The only
.apichange isTimestamp.epochMillis(), andTimestampis@ApiStatus.Internal.💡 Motivation and Context
Fewer callers to change when v9 removes
ICurrentDateProvider(JAVA-827), and fewer@SuppressWarnings("deprecation")once JAVA-839 deprecates it.💚 How did you test it?
New
TimestampTestcase forepochMillis()truncation. The exit-info integration tests andsentry-okhttptests already used the real clock and pass unchanged.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
JAVA-839 deprecates
CurrentDateProvider.getInstance()and the rest of the legacy clock API.#skip-changelog
🤖 Generated with Claude Code