Skip to content

Commit a52a423

Browse files
committed
removed few file.exists() and canRead() calls
1 parent 92822b9 commit a52a423

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

sentry-android-core/src/main/java/io/sentry/android/core/cache/AndroidEnvelopeCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ public static boolean hasStartupCrashMarker(final @NotNull SentryOptions options
156156
new String(buf, 0, 0);
157157
if (e instanceof FileNotFoundException) {
158158
options
159-
.getLogger()
160-
.log(DEBUG, "Last ANR marker does not exist. %s.", lastAnrMarker.getAbsolutePath());
159+
.getLogger()
160+
.log(DEBUG, "Last ANR marker does not exist. %s.", lastAnrMarker.getAbsolutePath());
161161
} else {
162162
options.getLogger().log(ERROR, "Error reading last ANR marker", e);
163163
}

sentry/src/main/java/io/sentry/cache/EnvelopeCache.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,12 @@ public void discard(final @NotNull SentryEnvelope envelope) {
345345
.getLogger()
346346
.log(DEBUG, "Discarding envelope from cache: %s", envelopeFile.getAbsolutePath());
347347
} else {
348-
options.getLogger().log(DEBUG, "Envelope was not cached or could not be deleted: %s", envelopeFile.getAbsolutePath());
348+
options
349+
.getLogger()
350+
.log(
351+
DEBUG,
352+
"Envelope was not cached or could not be deleted: %s",
353+
envelopeFile.getAbsolutePath());
349354
}
350355
}
351356

0 commit comments

Comments
 (0)