Skip to content

Commit 337a9f1

Browse files
runningcodeclaude
andauthored
ref(android): Remove unused lock from SentryPerformanceProvider (#5871)
* ref(android): Remove unused lock from SentryPerformanceProvider The field was added in #3715 to guard onAppStartDone(), its only user. That method was removed in the 8.x.x merge (#4033), leaving the lock orphaned — it has been allocated on every cold start since, in ContentProvider.onCreate, without ever being acquired. The ISentryLifecycleToken import stays: it is still used for AppStartMetrics.staticLock in shutdown(). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * changelog --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 82973ef commit 337a9f1

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Performance
6+
7+
- Remove an unused lock from `SentryPerformanceProvider`, which was allocated on every cold start in `ContentProvider.onCreate` without ever being acquired ([#5871](https://github.com/getsentry/sentry-java/pull/5871))
8+
39
## 8.51.0
410

511
### Features

‎sentry-android-core/src/main/java/io/sentry/android/core/SentryPerformanceProvider.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import io.sentry.android.core.internal.util.SentryFrameMetricsCollector;
2424
import io.sentry.android.core.performance.AppStartMetrics;
2525
import io.sentry.android.core.performance.TimeSpan;
26-
import io.sentry.util.AutoClosableReentrantLock;
2726
import java.io.BufferedReader;
2827
import java.io.File;
2928
import java.io.FileInputStream;
@@ -46,7 +45,6 @@ public final class SentryPerformanceProvider extends EmptySecureContentProvider
4645

4746
private final @NotNull ILogger logger;
4847
private final @NotNull BuildInfoProvider buildInfoProvider;
49-
private final @NotNull AutoClosableReentrantLock lock = new AutoClosableReentrantLock();
5048

5149
@TestOnly
5250
SentryPerformanceProvider(

0 commit comments

Comments
 (0)