RFR: jsr166 jdk integration 2018-05
Martin Buchholz
martinrb at google.com
Tue May 22 15:50:30 UTC 2018
We seem to have enough consensus to change the modCount behavior of
replaceAll.
But let's leave that to a future change and get this integration in by
(temporarily) reverting to the status quo:
Index: src/main/java/util/ArrayList.java
===================================================================
RCS file:
/export/home/jsr166/jsr166/jsr166/src/main/java/util/ArrayList.java,v
retrieving revision 1.61
diff -u -r1.61 ArrayList.java
--- src/main/java/util/ArrayList.java 18 May 2018 03:48:34 -0000 1.61
+++ src/main/java/util/ArrayList.java 22 May 2018 15:40:27 -0000
@@ -1737,6 +1737,7 @@
@Override
public void replaceAll(UnaryOperator<E> operator) {
replaceAllRange(operator, 0, size);
+ modCount++;
}
private void replaceAllRange(UnaryOperator<E> operator, int i, int
end) {
Index: src/main/java/util/Vector.java
===================================================================
RCS file: /export/home/jsr166/jsr166/jsr166/src/main/java/util/Vector.java,v
retrieving revision 1.50
diff -u -r1.50 Vector.java
--- src/main/java/util/Vector.java 5 May 2018 18:29:53 -0000 1.50
+++ src/main/java/util/Vector.java 22 May 2018 15:40:27 -0000
@@ -1411,6 +1411,7 @@
es[i] = operator.apply(elementAt(es, i));
if (modCount != expectedModCount)
throw new ConcurrentModificationException();
+ modCount++;
// checkInvariants();
}
Index: src/test/tck/Collection8Test.java
===================================================================
RCS file:
/export/home/jsr166/jsr166/jsr166/src/test/tck/Collection8Test.java,v
retrieving revision 1.54
diff -u -r1.54 Collection8Test.java
--- src/test/tck/Collection8Test.java 6 May 2018 22:33:06 -0000 1.54
+++ src/test/tck/Collection8Test.java 22 May 2018 15:40:27 -0000
@@ -952,7 +952,7 @@
} catch (java.io.NotSerializableException acceptable) {}
}
- public void testReplaceAllIsNotStructuralModification() {
+ public void DISABLED_testReplaceAllIsNotStructuralModification() {
Collection c = impl.emptyCollection();
if (!(c instanceof List))
return;
More information about the core-libs-dev
mailing list