Skip to content

Commit 9ff0dcf

Browse files
runningcodeclaude
andcommitted
docs(core): Drop an inaccurate reason for the lazy hostname cache
A superclass field initializer already dispatches to the subclass override of getMonotonicTicker(), and SentryAndroidOptions returns a static singleton, so building the cache eagerly would read the right ticker too. The blocking hostname lookup is the only reason it is lazy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent efe0c8e commit 9ff0dcf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎sentry/src/main/java/io/sentry/SentryOptions.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,7 @@ public class SentryOptions implements RateLimiterConfig {
539539
* Cache of the local hostname, used when {@link #isAttachServerName()} is enabled.
540540
*
541541
* <p>Evaluated lazily because resolving the hostname blocks on {@code
542-
* InetAddress.getLocalHost()}, which no {@code Sentry.init} should pay for up front. Deferring
543-
* also means {@link #getMonotonicTicker()} is read after subclasses have overridden it.
542+
* InetAddress.getLocalHost()}, which no {@code Sentry.init} should pay for up front.
544543
*/
545544
@ApiStatus.Internal
546545
private final @NotNull LazyEvaluator<HostnameCache> hostnameCache =

0 commit comments

Comments
 (0)