Skip to content

Commit 2627452

Browse files
committed
fix(android): Resolve the Error Prone and javac 21 findings in sentry-android-core
1 parent 38288e8 commit 2627452

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

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

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

20+
// temp fix for JDK 21: Never serialized.
21+
@SuppressWarnings("serial")
2022
private final @Nullable Thread thread;
2123

2224
ApplicationNotResponding(final @Nullable String message) {

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
/**
1414
* @deprecated `SentryUserFeedbackButton` will be removed in the next major version
1515
*/
16+
// temp fix for JDK 21: Constructors call overridable methods; making them final would break the
17+
// public API.
18+
@SuppressWarnings("this-escape")
1619
@Deprecated
1720
public class SentryUserFeedbackButton extends Button {
1821

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
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+
// temp fix for JDK 21: Constructors call overridable methods; making them final would break the
54+
// public API.
55+
@SuppressWarnings("this-escape")
5356
@ApiStatus.Internal
5457
public class AppStartMetrics extends ActivityLifecycleCallbacksAdapter {
5558
public interface HeadlessAppStartListener {

0 commit comments

Comments
 (0)