Skip to content

Commit 4b84c02

Browse files
ref: drop a redundant comment and stale pending wording
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent dc6f47b commit 4b84c02

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ public static SentryId captureEnvelopeNonTerminating(final @NotNull byte[] envel
294294
});
295295
}
296296

297-
// Capture the original envelope as-is (no session item attached).
298297
return scopes.captureEnvelope(envelope);
299298
} catch (Exception e) {
300299
options.getLogger().log(SentryLevel.ERROR, "Failed to capture envelope", e);

sentry-android-core/src/test/java/io/sentry/android/core/InternalSentrySdkTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ class InternalSentrySdkTest {
495495
assertThat(scopeSession.get().hasNonTerminatingUnhandledError()).isTrue()
496496
assertThat(scopeSession.get().sessionId).isEqualTo(originalSid.get())
497497

498-
// and it is persisted so pending survives process death
498+
// and it is persisted so the flag survives process death
499499
val sessionFile = EnvelopeCache.getCurrentSessionFile(fixture.options.cacheDirPath!!)
500500
val persistedSession =
501501
fixture.options.serializer.deserialize(sessionFile.reader(), Session::class.java)!!
@@ -541,10 +541,10 @@ class InternalSentrySdkTest {
541541
fixture.captureEnvelopeNonTerminatingWithEvent(
542542
fixture.createSentryEventWithUnhandledException()
543543
)
544-
val pendingSession = AtomicReference<Session>()
545-
Sentry.configureScope { scope -> pendingSession.set(scope.session) }
546-
val oldSid = pendingSession.get().sessionId
547-
assertThat(pendingSession.get().hasNonTerminatingUnhandledError()).isTrue()
544+
val unhandledSession = AtomicReference<Session>()
545+
Sentry.configureScope { scope -> unhandledSession.set(scope.session) }
546+
val oldSid = unhandledSession.get().sessionId
547+
assertThat(unhandledSession.get().hasNonTerminatingUnhandledError()).isTrue()
548548
fixture.capturedEnvelopes.clear()
549549

550550
// when a subsequent hard crash is captured through the existing terminating API

0 commit comments

Comments
 (0)