diff --git a/src/conf/checkstyle.xml b/src/conf/checkstyle.xml index 690e1d8a4b..2b959d03d3 100644 --- a/src/conf/checkstyle.xml +++ b/src/conf/checkstyle.xml @@ -71,6 +71,7 @@ + diff --git a/src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java b/src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java index b4232df5c7..3c5c3a3b5c 100644 --- a/src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java +++ b/src/main/java/org/apache/commons/pool3/impl/LinkedBlockingDeque.java @@ -953,13 +953,12 @@ public E pollLast() { * @return the unlinked element * @throws InterruptedException if the current thread is interrupted */ - public E pollLast(final Duration timeout) - throws InterruptedException { + public E pollLast(final Duration timeout) throws InterruptedException { long nanos = timeout.toNanos(); lock.lockInterruptibly(); try { E x; - while ( (x = unlinkLast()) == null) { + while ((x = unlinkLast()) == null) { if (nanos <= 0) { return null; } @@ -1292,7 +1291,7 @@ public E takeFirst() throws InterruptedException { lock.lock(); try { E x; - while ( (x = unlinkFirst()) == null) { + while ((x = unlinkFirst()) == null) { notEmpty.await(); } return x; @@ -1312,7 +1311,7 @@ public E takeLast() throws InterruptedException { lock.lock(); try { E x; - while ( (x = unlinkLast()) == null) { + while ((x = unlinkLast()) == null) { notEmpty.await(); } return x;