Fix the ConcurrentModification test that fails in jdk9+
Modification registration seems to changed in Java 9. Now if the asked capacity in `ensureCapacity` function is less than current capacity, no modification is registered.
This commit is contained in:
committed by
Space Team
parent
ac0e493bac
commit
bf1c9774aa
@@ -167,8 +167,8 @@ actual class ArrayList<E> private constructor(
|
||||
|
||||
final actual fun ensureCapacity(minCapacity: Int) {
|
||||
if (backingList != null) throw IllegalStateException() // just in case somebody casts subList to ArrayList
|
||||
registerModification()
|
||||
if (minCapacity <= backingArray.size) return
|
||||
registerModification()
|
||||
ensureCapacityInternal(minCapacity)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user