ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/Collection8Test.java
(Generate patch)

Comparing jsr166/src/test/tck/Collection8Test.java (file contents):
Revision 1.53 by jsr166, Sun May 6 22:09:42 2018 UTC vs.
Revision 1.59 by jsr166, Tue Apr 30 00:50:31 2019 UTC

# Line 182 | Line 182 | public class Collection8Test extends JSR
182              () -> c.iterator().forEachRemaining(null),
183              () -> c.spliterator().forEachRemaining(null),
184              () -> c.spliterator().tryAdvance(null),
185 <            () -> c.toArray(null));
185 >            () -> c.toArray((Object[])null));
186  
187          if (!impl.permitsNulls()) {
188              assertThrows(
# Line 210 | Line 210 | public class Collection8Test extends JSR
210              BlockingQueue q = (BlockingQueue) c;
211              assertThrows(
212                  NullPointerException.class,
213 <                () -> {
214 <                    try { q.offer(null, 1L, HOURS); }
215 <                    catch (InterruptedException ex) {
216 <                        throw new AssertionError(ex);
217 <                    }},
218 <                () -> {
219 <                    try { q.put(null); }
220 <                    catch (InterruptedException ex) {
221 <                        throw new AssertionError(ex);
222 <                    }});
213 >                () -> q.offer(null, 1L, HOURS),
214 >                () -> q.put(null));
215          }
216          if (c instanceof BlockingDeque) {
217              BlockingDeque q = (BlockingDeque) c;
218              assertThrows(
219                  NullPointerException.class,
220 <                () -> {
221 <                    try { q.offerFirst(null, 1L, HOURS); }
222 <                    catch (InterruptedException ex) {
223 <                        throw new AssertionError(ex);
232 <                    }},
233 <                () -> {
234 <                    try { q.offerLast(null, 1L, HOURS); }
235 <                    catch (InterruptedException ex) {
236 <                        throw new AssertionError(ex);
237 <                    }},
238 <                () -> {
239 <                    try { q.putFirst(null); }
240 <                    catch (InterruptedException ex) {
241 <                        throw new AssertionError(ex);
242 <                    }},
243 <                () -> {
244 <                    try { q.putLast(null); }
245 <                    catch (InterruptedException ex) {
246 <                        throw new AssertionError(ex);
247 <                    }});
220 >                () -> q.offerFirst(null, 1L, HOURS),
221 >                () -> q.offerLast(null, 1L, HOURS),
222 >                () -> q.putFirst(null),
223 >                () -> q.putLast(null));
224          }
225      }
226  
# Line 610 | Line 586 | public class Collection8Test extends JSR
586                  if (rnd.nextBoolean()) assertTrue(it.hasNext());
587                  assertTrue(copy.contains(it.next()));
588              }
589 +            if (rnd.nextBoolean()) assertTrue(it.hasNext());
590              it.forEachRemaining(
591                  e -> {
592                      assertTrue(c.contains(e));
# Line 951 | Line 928 | public class Collection8Test extends JSR
928          } catch (java.io.NotSerializableException acceptable) {}
929      }
930  
931 <    public void testReplaceAllIsNotStructuralModification() {
931 >    /**
932 >     * TODO: move out of limbo
933 >     * 8203662: remove increment of modCount from ArrayList and Vector replaceAll()
934 >     */
935 >    public void DISABLED_testReplaceAllIsNotStructuralModification() {
936          Collection c = impl.emptyCollection();
937          if (!(c instanceof List))
938              return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines