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

LinkedBlockingQueue/Deque.drainTo(Collection,int) returns 'maxElements' if its value is negative

XMLWordPrintable

    • b15
    • generic
    • generic
    • Verified

      According to the specification for BlockingQueue.drainTo(Collection c, int maxElements), this method should return "the number of elements transferred". However the implementation of this method for LinkedBlockingQueue and LinkedBlockingDeque when given a negative number returns the given negative number.

            chegar Chris Hegarty
            dmiltsov Dmitry Miltsov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: