Fix NoSuchElementException by using poll when accessing serviceRequests#1190
Merged
Conversation
tonidero
approved these changes
Aug 3, 2023
tonidero
reviewed
Aug 3, 2023
Codecov Report
@@ Coverage Diff @@
## main #1190 +/- ##
=======================================
Coverage 85.92% 85.92%
=======================================
Files 181 181
Lines 6216 6217 +1
Branches 899 900 +1
=======================================
+ Hits 5341 5342 +1
Misses 533 533
Partials 342 342
|
Member
Author
|
@tonidero another approach |
tonidero
approved these changes
Aug 3, 2023
tonidero
left a comment
Contributor
There was a problem hiding this comment.
We should update the PR name and description, but this looks good!
tonidero
pushed a commit
that referenced
this pull request
Aug 10, 2023
**This is an automatic release.** ### Bugfixes * Fix NoSuchElementException by using poll when accessing serviceRequests (#1190) via Cesar de la Vega (@vegaro) ### Other Changes * Debug view: rename package (#1191) via Toni Rico (@tonidero) * Debugview: Add snapshot tests for debug view using Paparazzi (#1187) via Toni Rico (@tonidero) * Debug view: Add offerings section and purchasing capabilities (#1186) via Toni Rico (@tonidero) * Debug view: Initial UI + Usage in MagicWeatherCompose (#1075) via Toni Rico (@tonidero) * Remove customEntitlementComputation flavor for non-purchases modules (#1180) via Toni Rico (@tonidero) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We are getting reports of this exception
In this piece of code
I can't think of a way that's possible since the access to
serviceRequestsis synchronized. But reports of the exception come only from Android 12, so I am thinking there could be an issue in Android itselfAnyways, I changed the implementation to use
pollinstead, which instead of throwing a exception, returns null if the queue is empty