-
Notifications
You must be signed in to change notification settings - Fork 207
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
[PLAT-8191] Add Bugsnag.isStarted #1640
Conversation
33d9ee7
to
a427799
Compare
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.
LGTM
* other methods will throw IllegalStateException. | ||
*/ | ||
public static boolean isStarted() { | ||
return client != null; |
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.
This isn't thread safe - it's using the field directly without obtaining the lock. It could be made thread safe by using getClient()
not client
. I made #1795 for this.
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 could use a https://developer.android.com/reference/androidx/annotation/GuardedBy annotation on the client field to document the locking requirement.
Goal
From #1621:
Raised internally for CI and merge purposes.