Avoiding concurrent modification exception
This commit is contained in:
parent
9b1a5fa929
commit
9372d17313
|
@ -43,7 +43,7 @@ open class TanChallenge(
|
||||||
internal fun userApprovedDecoupledTan(responseAfterApprovingDecoupledTan: BankResponse) {
|
internal fun userApprovedDecoupledTan(responseAfterApprovingDecoupledTan: BankResponse) {
|
||||||
this.enterTanResult = EnterTanResult(null, true, responseAfterApprovingDecoupledTan)
|
this.enterTanResult = EnterTanResult(null, true, responseAfterApprovingDecoupledTan)
|
||||||
|
|
||||||
userApprovedDecoupledTanCallbacks.forEach {
|
userApprovedDecoupledTanCallbacks.toTypedArray().forEach { // copy to avoid ConcurrentModificationException
|
||||||
try {
|
try {
|
||||||
it.invoke()
|
it.invoke()
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
|
@ -60,7 +60,7 @@ open class TanChallenge(
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun tanExpired() {
|
internal fun tanExpired() {
|
||||||
tanExpiredCallbacks.forEach {
|
tanExpiredCallbacks.toTypedArray().forEach {
|
||||||
try {
|
try {
|
||||||
it.invoke()
|
it.invoke()
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
|
|
Loading…
Reference in New Issue