Fix test: compute if present is a put.
This commit is contained in:
parent
25ea554df8
commit
65ce14b757
|
@ -1622,13 +1622,9 @@ public abstract class AbstractMapTest<M extends Map<K, V>, K, V> extends Abstrac
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (isPutChangeSupported()) {
|
} else if (isPutChangeSupported()) {
|
||||||
|
// compute if present is a put.
|
||||||
resetEmpty();
|
resetEmpty();
|
||||||
try {
|
|
||||||
getMap().computeIfPresent(keys[0], (k, v) -> values[0]);
|
getMap().computeIfPresent(keys[0], (k, v) -> values[0]);
|
||||||
fail("Expected UnsupportedOperationException or IllegalArgumentException on putIfAbsent (add) when fixed size");
|
|
||||||
} catch (final IllegalArgumentException | UnsupportedOperationException ex) {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
resetFull();
|
resetFull();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (final Iterator<K> it = getMap().keySet().iterator(); it.hasNext() && i < newValues.length; i++) {
|
for (final Iterator<K> it = getMap().keySet().iterator(); it.hasNext() && i < newValues.length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue