JDK-8181580 : No CCC for LinkedBlockingDeque#addAll
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.concurrent
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Submitted: 2017-06-05
  • Updated: 2017-06-19
  • Resolved: 2017-06-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
Spec of overriding method: LinkedBlockingDeque#addAll :

���Appends all of the elements in the specified collection to **the end of this deque**, in the order that they are returned by the specified collection's iterator. Attempts to addAll of a deque to itself result in IllegalArgumentException.���


Spec of overridden method: AbstractQueue#addAll (taking excerpts here which are relevant)

���Adds all of the elements in the specified collection to this queue. This implementation iterates over the specified collection, and adds each element returned by the iterator to this queue, in turn.���

**Also besides this, this spec has an extra ���Throws: ClassCastException ������  which is absent in overriding method.**

The overriding method mentions the ���end of this deque��� and this information is absent in the super class spec  which just says ���adds��� but does not mean adding to the last ���

I am presuming this to be  a noCCC candidate. Could you please confirm.

Comments
The CCC request for JDK-8169748 has been approved. Closing this issue as Closed/Approved.
19-06-2017

The spec change to LinkedBlockingDeque.addAll was made as part of the following bugfix and changeset: JDK-8169748 LinkedTransferQueue bulk remove is O(n^2) http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/06bdfec766f4 Although this bug concerned bulk removal in LTQ, this prompted some internal reorganization in various related implementation classes, which in turn led to new override of LinkedBlockingDeque.addAll along with a specification customized for this class (instead of inheriting it). CCC has been filed. This bug should be closed manually after the CCC request has been approved. There will be no changeset corresponding to this issue.
17-06-2017

Bharath, yes, these spec changes are all intentional (and are what users expect, and are restrictions relative to the super-class. AbstractQueue doesn't really have any interface specs itself for users, only for subclassers, so when comparing specs, one should look only at the super-interfaces, not superclasses.
06-06-2017

Stuart, can you add shepherd this along with the ArrayDeque CCC ?
05-06-2017

we're adding spec for the family of Deque#addAll methods
05-06-2017