Skip to content

Commit 561324b

Browse files
committed
build: Drop the Error Prone and NullAway code fixes, they move to their own PR
1 parent 2de047f commit 561324b

82 files changed

Lines changed: 96 additions & 182 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
final class ApplicationNotResponding extends RuntimeException {
1818
private static final long serialVersionUID = 252541144579117016L;
1919

20-
// Never serialized.
21-
@SuppressWarnings("serial")
2220
private final @Nullable Thread thread;
2321

2422
ApplicationNotResponding(final @Nullable String message) {

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
/**
1414
* @deprecated `SentryUserFeedbackButton` will be removed in the next major version
1515
*/
16-
// Constructors call overridable methods; making them final would break the public API.
17-
@SuppressWarnings("this-escape")
1816
@Deprecated
1917
public class SentryUserFeedbackButton extends Button {
2018

‎sentry-android-core/src/main/java/io/sentry/android/core/performance/AppStartMetrics.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@
5050
* <p>This class is also responsible for - determining the app start type (cold, warm) - determining
5151
* if the app was launched in foreground
5252
*/
53-
// Constructors call overridable methods; making them final would break the public API.
54-
@SuppressWarnings("this-escape")
5553
@ApiStatus.Internal
5654
public class AppStartMetrics extends ActivityLifecycleCallbacksAdapter {
5755
public interface HeadlessAppStartListener {

‎sentry-async-profiler/src/main/java/io/sentry/asyncprofiler/convert/JfrAsyncProfilerToSentryProfileConverter.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ private class ProfileEventVisitor implements EventCollector.Visitor {
8383
private final @NotNull JfrReader jfr;
8484
private final @NotNull Arguments args;
8585

86-
ProfileEventVisitor(
86+
public ProfileEventVisitor(
8787
@NotNull SentryProfile sentryProfile,
8888
@NotNull SentryStackTraceFactory stackTraceFactory,
8989
@NotNull JfrReader jfr,

‎sentry-jul/src/main/java/io/sentry/jul/SentryHandler.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
import org.slf4j.MDC;
4141

4242
/** Logging handler in charge of sending the java.util.logging records to a Sentry server. */
43-
// Constructors call overridable methods; making them final would break the public API.
44-
@SuppressWarnings("this-escape")
4543
@Open
4644
public class SentryHandler extends Handler {
4745
public static final String MECHANISM_TYPE = "JulSentryHandler";

‎sentry-kafka/src/main/java/io/sentry/kafka/SentryKafkaConsumerTracing.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ private void finishTransaction(
247247

248248
try {
249249
final double enqueuedTimeSeconds = Double.parseDouble(enqueuedTimeStr);
250-
final double nowSeconds = DateUtils.millisToSeconds((double) System.currentTimeMillis());
250+
final double nowSeconds = DateUtils.millisToSeconds(System.currentTimeMillis());
251251
final long latencyMs = (long) ((nowSeconds - enqueuedTimeSeconds) * 1000);
252252
return latencyMs >= 0 ? latencyMs : null;
253253
} catch (NumberFormatException ignored) {

‎sentry-kafka/src/main/java/io/sentry/kafka/SentryKafkaProducer.java‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ static final class SentryProducerHandler<K, V> implements InvocationHandler {
114114
}
115115

116116
@Override
117-
// Proxy equals() is identity-based.
118-
@SuppressWarnings({"unchecked", "ReferenceEquality"})
117+
@SuppressWarnings("unchecked")
119118
public @Nullable Object invoke(
120119
final @NotNull Object proxy, final @NotNull Method method, final @Nullable Object[] args)
121120
throws Throwable {
@@ -237,8 +236,7 @@ private void maybeInjectHeaders(final @NotNull Headers headers, final @Nullable
237236
headers.remove(SENTRY_ENQUEUED_TIME_HEADER);
238237
headers.add(
239238
SENTRY_ENQUEUED_TIME_HEADER,
240-
DateUtils.doubleToBigDecimal(
241-
DateUtils.millisToSeconds((double) System.currentTimeMillis()))
239+
DateUtils.doubleToBigDecimal(DateUtils.millisToSeconds(System.currentTimeMillis()))
242240
.toString()
243241
.getBytes(StandardCharsets.UTF_8));
244242
} catch (Throwable t) {

‎sentry-logback/src/main/java/io/sentry/logback/SentryAppender.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ protected void captureLog(@NotNull ILoggingEvent loggingEvent) {
197197
final @NotNull SentryLogParameters params = SentryLogParameters.create(attributes);
198198
params.setOrigin("auto.log.logback");
199199

200-
Sentry.logger()
201-
.log(sentryLevel, params, formattedMessage, arguments != null ? arguments : new Object[0]);
200+
Sentry.logger().log(sentryLevel, params, formattedMessage, arguments);
202201
}
203202

204203
@SuppressWarnings("deprecation")

‎sentry-opentelemetry/sentry-opentelemetry-bootstrap/src/main/java/io/sentry/opentelemetry/OtelContextScopesStorage.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public final class OtelContextScopesStorage implements IScopesStorage {
1717

1818
@Override
1919
public void init() {
20-
/*
20+
/**
2121
* We're currently overriding the storage mechanism to allow for cleanup of non closed OTel
2222
* scopes. These happen when using e.g. Sentry static API due to getCurrentScopes() invoking
2323
* Context.makeCurrent and then ignoring the returned lifecycle token (OTel Scope). After fixing

‎sentry-opentelemetry/sentry-opentelemetry-bootstrap/src/main/java/io/sentry/opentelemetry/SentryOtelThreadLocalStorage.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ public final class SentryOtelThreadLocalStorage implements ContextStorage {
2929

3030
private static final ThreadLocal<Context> THREAD_LOCAL_STORAGE = new ThreadLocal<>();
3131

32-
// Same identity check as OpenTelemetry's ThreadLocalContextStorage.
33-
@SuppressWarnings("ReferenceEquality")
3432
@Override
3533
public Scope attach(Context toAttach) {
3634
if (toAttach == null) {

0 commit comments

Comments
 (0)