Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4910196

Concurrency : removeAll() method doesn't work properly.

XMLWordPrintable

      Execute the following code with Concurrency preliminary test release 1
      and see the result. removeAll() method doesn't work properly. For a valid
      element list it doesn't return true.

      /* start of sample test code */
      ArrayBlockingQueue < String > queue = new ArrayBlockingQueue < String> (3);
             
      queue.add("str1");
      queue.add("str2");
      queue.add("str3");
                     
      ArrayList list = new ArrayList();
      list.add("str1");
      list.add("str2");
      System.out.println("status = " + queue.removeAll(list));
      System.out.println(queue.toString());
      /* end of sample test code */

      This is only a backlog bug and added to bugtraq just for tracking purpose.
      It has been fixed.

            jjb Josh Bloch
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: