Repository navigation
Conversation
📲 Install BuildsAndroid
|
| final class ApplicationNotResponding extends RuntimeException { | ||
| private static final long serialVersionUID = 252541144579117016L; | ||
|
|
||
| // Never serialized. | ||
| @SuppressWarnings("serial") | ||
| private final @Nullable Thread thread; | ||
|
|
||
| ApplicationNotResponding(final @Nullable String message) { |
There was a problem hiding this comment.
io.sentry.android.core.ApplicationNotResponding — Header has source URL and "Based on" origin but omits the required Copyright line and License name (present on sibling ANRWatchDog.java). Add Copyright (c) 2016 Salomon BRYS and The MIT License (or equivalent) to the file header.
Evidence
- Lines 1–2 state source URL
SalomonBrys/ANR-WatchDog/.../ANRError.javaand "Based on the class above" (vendored). - Header has no
Copyrightline and no license name (MIT/Licensed under). ANRWatchDog.javain the same package includes Adapted-from, MIT License, andCopyright (c) 2016 Salomon BRYS.THIRD_PARTY_NOTICES.mdlists Copyright(c) 2016 Salomon BRYSand MIT for this library.
Identified by Warden · check-code-attribution · 4MB-UVC
| final class ApplicationNotResponding extends RuntimeException { | ||
| private static final long serialVersionUID = 252541144579117016L; | ||
|
|
||
| // Never serialized. | ||
| @SuppressWarnings("serial") | ||
| private final @Nullable Thread thread; | ||
|
|
||
| ApplicationNotResponding(final @Nullable String message) { |
There was a problem hiding this comment.
io.sentry.android.core.ApplicationNotResponding — Adapted from ANR-WatchDog ANRError.java, but the SalomonBrys ANR-WatchDog entry Scope only names io.sentry.android.core.ANRWatchDog. Add ApplicationNotResponding to that entry's Scope.
Evidence
- File header cites
ANRError.javafrom SalomonBrys ANR-WatchDog commit1969075. THIRD_PARTY_NOTICES.md"SalomonBrys — ANR-WatchDog (MIT)" Scope only states code resides inio.sentry.android.core.ANRWatchDog.- Search of
THIRD_PARTY_NOTICES.mdfinds noApplicationNotRespondingorANRErrorScope reference. - Class remains in tree and is used by
ANRWatchDog/AnrIntegration.
Identified by Warden · check-code-attribution · DUA-PUT
📜 Description
Switches the build and CI from JDK 17 to JDK 21, so that we can run Robolectric tests on SDK 37 (Android 17). The bytecode we publish does not change: libraries still target Java 8 (Spring Boot 4 / Spring 7 modules still target 17).
Just changing to 21 has a few ripple effects, so there's quite a broad set of changes involved across the codebase.
JDK 21
CONTRIBUTING.mdis updated.--release <target>. A newer JDK could otherwise let APIs such asList.getFirst()get into Java 8 bytecode without a compile error, reducing the risk of introducing breaking changes for Android.Robolectric 4.15 → 4.17
sentry-android-corenow runs its default sandbox on SDK 23.--add-opens=java.base/java.io. Without it, the SDK 37 sandbox (the default, astargetSdkis 37) cannot start.Mockito 4.8 → 5.24, mockito-kotlin 4.1 → 6.4
net.bytebuddy.experimental.mockito-inlineis replaced withmockito-core. Mockito 5 uses the inline mock maker by default.anyVararg(), because in Mockito 5any()on a varargs parameter matches exactly one argument.Error Prone 2.11 → 2.50, NullAway 0.9.5 → 0.14.2, Gradle plugin 3.0.1 → 5.1.1
Scope.executeBeforeBreadcrumbcould throw an NPE. This happens when the callback returnsnulland theclose()of the reentrancy guard then throws.MethodInvocation.getThis(), which isnullfor static methods. They now pass anulltarget class toAopUtils.getMostSpecificMethod.invoke()is now@Nullable, the same as the Spring 7 contract.SentryAppender(logback) passes an empty array instead ofnullvarargs. The behavior is the same.instanceof(Java 17 modules only),Locale.ROOTfortoUpperCase, explicitlong→doublecasts,/**on non-Javadoc comments, and modifiers on effectively-private members.JdkObsoletereplacements that need Java 10+,this-escapein public non-final classes,serial, and the vendored Gson.Other
SentryEnvelopeItemTest."fromAttachment with file SecurityManager denies read access"installs aSecurityManager. Since JDK 18 this needs-Djava.security.manager=allow, which thesentrytests now set.💡 Motivation and Context
Preparation for SDK 37 support (for example
ActivityManager.registerAnrWarningListener). We cannot test it with Robolectric on JDK 17.💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
#skip-changelog