Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Fix ANRs when collecting device context ([#4970](https://github.com/getsentry/sentry-java/pull/4970))
- **IMPORTANT:** This disables collecting external storage size (total/free) by default, to enable it back
use `options.isCollectExternalStorageContext = true` or `<meta-data android:name="io.sentry.external-storage-context" android:value="true" />`
- Fix `NullPointerException` when reading ANR marker ([#4979](https://github.com/getsentry/sentry-java/pull/4979))

### Improvements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static boolean hasStartupCrashMarker(final @NotNull SentryOptions options
final String content = FileUtils.readText(lastAnrMarker);
// we wrapped into try-catch already
//noinspection ConstantConditions
return content.equals("null") ? null : Long.parseLong(content.trim());
return (content == null || content.equals("null")) ? null : Long.parseLong(content.trim());
} catch (Throwable e) {
if (e instanceof FileNotFoundException) {
options
Expand Down
Loading