File tree Expand file tree Collapse file tree
core-java/src/test/java/com/baeldung/java/concurrentmodification Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- package com .baeldung .java .concurrentmodificationexception ;
1+ package com .baeldung .java .concurrentmodification ;
22
3- import org .assertj .core .api .Assertions ;
43import org .junit .Test ;
54
65import java .util .ArrayList ;
@@ -22,7 +21,7 @@ public void givenIterating_whenRemoving_thenThrowException() throws InterruptedE
2221 }
2322
2423 @ Test
25- public void givenIterating_whenUsingIteratorRemove_thenDontError () throws InterruptedException {
24+ public void givenIterating_whenUsingIteratorRemove_thenNoError () throws InterruptedException {
2625
2726 ArrayList <Integer > integers = newArrayList (1 , 2 , 3 );
2827
@@ -37,7 +36,7 @@ public void givenIterating_whenUsingIteratorRemove_thenDontError() throws Interr
3736 }
3837
3938 @ Test
40- public void givenIterating_whenUsingRemovalList_thenDontError () throws InterruptedException {
39+ public void givenIterating_whenUsingRemovalList_thenNoError () throws InterruptedException {
4140
4241 ArrayList <Integer > integers = newArrayList (1 , 2 , 3 );
4342 ArrayList <Integer > toRemove = newArrayList ();
@@ -57,7 +56,7 @@ public void whenUsingRemoveIf_thenRemoveElements() throws InterruptedException {
5756
5857 ArrayList <Integer > integers = newArrayList (1 , 2 , 3 );
5958
60- integers .removeIf (( i ) -> i == 2 );
59+ integers .removeIf (i -> i == 2 );
6160
6261 assertThat (integers ).containsExactly (1 , 3 );
6362 }
You can’t perform that action at this time.
0 commit comments