-
-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all operations involving file reads were moved to background threads #1959
all operations involving file reads were moved to background threads #1959
Conversation
try { | ||
this.device_cpu_frequencies = deviceCpuFrequenciesReader.call(); | ||
} catch (Exception e) { | ||
this.device_cpu_frequencies = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need that? device_cpu_frequencies
is already created in the field declaration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just because I cannot leave exception block empty. Since there's no logger to log the exception i don't know if it's fine to call e.printStackTrace()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can, do this:
} catch (Throwable ignored) {
// should never happen
}
just name it ignored
and add a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I previously did
} catch (Throwable ignored) {
}
without the comment and it was complaining. I added the comment and now it's fine, thanks!
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- all operations involving file reads were moved to background threads ([#1959](https://github.com/getsentry/sentry-java/pull/1959)) If none of the above apply, you can opt out of this check by adding |
📜 Description
All operations involving IO have been moved to the background, as enabling the strict mode on Android was causing crashes