Skip to content

Commit f4ace05

Browse files
committed
Replace iterator with forEach
1 parent e42a98a commit f4ace05

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/src/main/java/at/bitfire/cert4android/UserDecisionRegistry.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,8 @@ class UserDecisionRegistry private constructor(
9494

9595
// continue work that's waiting for decisions
9696
synchronized(pendingDecisions) {
97-
pendingDecisions[cert]?.iterator()?.let { iter ->
98-
while (iter.hasNext()) {
99-
iter.next().resume(trusted)
100-
iter.remove()
101-
}
97+
pendingDecisions[cert]?.forEach { cont ->
98+
cont.resume(trusted)
10299
}
103100

104101
// remove certificate from pendingDecisions so UI can be shown again in future

0 commit comments

Comments
 (0)