Fill some Javadoc gaps git-svn-id: https://svn.apache.org/repos/asf/commons/proper/pool/trunk@1725738 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/commons-pool/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-pool/commit/3737d6e6 Tree: http://git-wip-us.apache.org/repos/asf/commons-pool/tree/3737d6e6 Diff: http://git-wip-us.apache.org/repos/asf/commons-pool/diff/3737d6e6 Branch: refs/heads/master Commit: 3737d6e67cd4c2b141c1db6125a996c198e51909 Parents: d404937 Author: Mark Thomas <ma...@apache.org> Authored: Wed Jan 20 15:20:09 2016 +0000 Committer: Mark Thomas <ma...@apache.org> Committed: Wed Jan 20 15:20:09 2016 +0000 ---------------------------------------------------------------------- .../commons/pool2/impl/LinkedBlockingDeque.java | 52 ++++++++++++-------- 1 file changed, 32 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-pool/blob/3737d6e6/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java b/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java index 8ace792..dcbcc18 100644 --- a/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java +++ b/src/main/java/org/apache/commons/pool2/impl/LinkedBlockingDeque.java @@ -418,8 +418,9 @@ class LinkedBlockingDeque<E> extends AbstractQueue<E> * * @param e element to link * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public void putFirst(E e) throws InterruptedException { if (e == null) { @@ -441,8 +442,9 @@ class LinkedBlockingDeque<E> extends AbstractQueue<E> * * @param e element to link * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public void putLast(E e) throws InterruptedException { if (e == null) { @@ -468,8 +470,9 @@ class LinkedBlockingDeque<E> extends AbstractQueue<E> * * @return {@code true} if successful, otherwise {@code false} * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public boolean offerFirst(E e, long timeout, TimeUnit unit) throws InterruptedException { @@ -501,8 +504,9 @@ class LinkedBlockingDeque<E> extends AbstractQueue<E> * * @return {@code true} if successful, otherwise {@code false} * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whist waiting + * for space */ public boolean offerLast(E e, long timeout, TimeUnit unit) throws InterruptedException { @@ -773,8 +777,9 @@ class LinkedBlockingDeque<E> extends AbstractQueue<E> * * @param e element to link * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public void put(E e) throws InterruptedException { putLast(e); @@ -792,8 +797,9 @@ class LinkedBlockingDeque<E> extends AbstractQueue<E> * * @return {@code true} if successful, otherwise {@code false} * - * @throws NullPointerException - * @throws InterruptedException + * @throws NullPointerException if e is null + * @throws InterruptedException if the thread is interrupted whilst waiting + * for space */ public boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException { @@ -898,10 +904,13 @@ class LinkedBlockingDeque<E> extends AbstractQueue<E> * * @return number of elements added to the collection * - * @throws UnsupportedOperationException - * @throws ClassCastException - * @throws NullPointerException - * @throws IllegalArgumentException + * @throws UnsupportedOperationException if the add operation is not + * supported by the specified collection + * @throws ClassCastException if the class of the elements held by this + * collection prevents them from being added to the specified + * collection + * @throws NullPointerException if c is null + * @throws IllegalArgumentException if c is this instance */ public int drainTo(Collection<? super E> c) { return drainTo(c, Integer.MAX_VALUE); @@ -915,10 +924,13 @@ class LinkedBlockingDeque<E> extends AbstractQueue<E> * @param maxElements maximum number of elements to remove from the queue * * @return number of elements added to the collection - * @throws UnsupportedOperationException - * @throws ClassCastException - * @throws NullPointerException - * @throws IllegalArgumentException + * @throws UnsupportedOperationException if the add operation is not + * supported by the specified collection + * @throws ClassCastException if the class of the elements held by this + * collection prevents them from being added to the specified + * collection + * @throws NullPointerException if c is null + * @throws IllegalArgumentException if c is this instance */ public int drainTo(Collection<? super E> c, int maxElements) { if (c == null) {