< prev index next >

test/jdk/java/util/Spliterator/SpliteratorFailFastTest.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.
--- 1,7 ---
  /*
!  * Copyright (c) 2013, 2024, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

*** 45,11 ***
  
  import static org.testng.Assert.assertThrows;
  
  /**
   * @test
!  * @bug 8148748
   * @summary Spliterator fail-fast tests
   * @run testng SpliteratorFailFastTest
   */
  
  @Test
--- 45,11 ---
  
  import static org.testng.Assert.assertThrows;
  
  /**
   * @test
!  * @bug 8148748 8336672
   * @summary Spliterator fail-fast tests
   * @run testng SpliteratorFailFastTest
   */
  
  @Test

*** 62,12 ***
          if (spliteratorDataProvider != null) {
              return spliteratorDataProvider;
          }
  
          List<Object[]> data = new ArrayList<>();
!         SpliteratorDataBuilder<Integer> db =
!                 new SpliteratorDataBuilder<>(data, 5, Arrays.asList(1, 2, 3, 4));
  
          // Collections
  
          db.addList(ArrayList::new);
  
--- 62,12 ---
          if (spliteratorDataProvider != null) {
              return spliteratorDataProvider;
          }
  
          List<Object[]> data = new ArrayList<>();
!         SpliteratorDataBuilder<String> db =
!                 new SpliteratorDataBuilder<>(data, "Z", Arrays.asList("A", "B", "C", "D"));
  
          // Collections
  
          db.addList(ArrayList::new);
  

*** 82,11 ***
          db.addCollection(LinkedHashSet::new);
  
          db.addCollection(TreeSet::new);
  
          db.addCollection(c -> {
!             Stack<Integer> s = new Stack<>();
              s.addAll(c);
              return s;
          });
  
          db.addCollection(PriorityQueue::new);
--- 82,11 ---
          db.addCollection(LinkedHashSet::new);
  
          db.addCollection(TreeSet::new);
  
          db.addCollection(c -> {
!             Stack<String> s = new Stack<>();
              s.addAll(c);
              return s;
          });
  
          db.addCollection(PriorityQueue::new);

*** 104,11 ***
          db.addMap(LinkedHashMap::new);
  
          // This fails when run through jtreg but passes when run through
          // ant
  //        db.addMap(IdentityHashMap::new);
! 
          db.addMap(WeakHashMap::new);
  
          // @@@  Descending maps etc
          db.addMap(TreeMap::new);
  
--- 104,11 ---
          db.addMap(LinkedHashMap::new);
  
          // This fails when run through jtreg but passes when run through
          // ant
  //        db.addMap(IdentityHashMap::new);
!         // BUG: Assumes identity
          db.addMap(WeakHashMap::new);
  
          // @@@  Descending maps etc
          db.addMap(TreeMap::new);
  
< prev index next >