Commit 770ffa8
committed
Android Crash: [Not fixed in 5.230.0] java.util.NoSuchElementException - kotlinx.coroutines.flow.FlowKt__ReduceKt.first(Reduce.kt:92) (#5932)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1202552961248957/task/1210012823537208?focus=true
### Description
This PR replaces usages of `first()` with `firstOrNull()` in two
locations to prevent potential crashes when collecting from empty flows.
### Steps to test this PR
N/A1 parent 12170fb commit 770ffa8
File tree
2 files changed
+4
-2
lines changed- autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/ui/credential/management
- broken-site/broken-site-impl/src/main/java/com/duckduckgo/brokensite/impl
2 files changed
+4
-2
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
670 | 671 | | |
671 | 672 | | |
672 | 673 | | |
673 | | - | |
| 674 | + | |
674 | 675 | | |
675 | 676 | | |
676 | 677 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | | - | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
0 commit comments