Skip to content
Prev Previous commit
Next Next commit
Format code
  • Loading branch information
getsentry-bot committed Oct 3, 2024
commit 0511933f2508c5ce86f226bcac8d99eefdf42c19
3 changes: 1 addition & 2 deletions sentry/src/main/java/io/sentry/SentryOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,7 @@ public class SentryOptions {
private boolean traceOptionsRequests = true;

/** Date provider to retrieve the current date from. */
@ApiStatus.Internal
private volatile @Nullable SentryDateProvider dateProvider;
@ApiStatus.Internal private volatile @Nullable SentryDateProvider dateProvider;

private final @NotNull Object dateProviderLock = new Object();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@
@ApiStatus.Internal
final class AtomicClientReportStorage implements IClientReportStorage {

private final @NotNull LazyEvaluator<Map<ClientReportKey, AtomicLong>> lostEventCounts = new LazyEvaluator<>(() -> {
final Map<ClientReportKey, AtomicLong> modifyableEventCountsForInit = new ConcurrentHashMap<>();

for (final DiscardReason discardReason : DiscardReason.values()) {
for (final DataCategory category : DataCategory.values()) {
modifyableEventCountsForInit.put(
new ClientReportKey(discardReason.getReason(), category.getCategory()),
new AtomicLong(0));
}
}

return Collections.unmodifiableMap(modifyableEventCountsForInit);
});
private final @NotNull LazyEvaluator<Map<ClientReportKey, AtomicLong>> lostEventCounts =
new LazyEvaluator<>(
() -> {
final Map<ClientReportKey, AtomicLong> modifyableEventCountsForInit =
new ConcurrentHashMap<>();

for (final DiscardReason discardReason : DiscardReason.values()) {
for (final DataCategory category : DataCategory.values()) {
modifyableEventCountsForInit.put(
new ClientReportKey(discardReason.getReason(), category.getCategory()),
new AtomicLong(0));
}
}

return Collections.unmodifiableMap(modifyableEventCountsForInit);
});

public AtomicClientReportStorage() {}

Expand Down