-
Notifications
You must be signed in to change notification settings - Fork 271
function MutableList<T>.moveDownAll() & moveUpAll() throw java.util.ConcurrentModificationException #1340
Comments
version: |
version: |
snippet of the code in which the problem is reproduced PS: I understand what the error is, but I want to make sure that it is not related to your code, but the problem is in tornadofx |
Is it my use wrong ? |
the problem is tornadofx. Although it is not clear why it began to reproduce right now. Try polle low version of Kotlin 1.4 or 1.3. Here is the code that fixes the problem. inline fun <T> MutableList<T>.moveDownAll(crossinline predicate: (T) -> Boolean) = withIndex()
.filter { predicate(it.value) }
.forEach { moveDownAt(it.index) } |
ok,thank you. |
It works well. |
I think it is not worth closing, since the problem in the library has not been fixed |
I notice there is a modify operation in for-Each. Is that a mistake?
The text was updated successfully, but these errors were encountered: