Skip to content

Commit

Permalink
Fix ParenPad
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jan 21, 2025
1 parent 5267e87 commit e44cdd1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/conf/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
<property name="ordered" value="true"/>
<property name="separated" value="true"/>
</module>
<module name="ParenPad" />
<module name="TypecastParenPad" />
</module>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit e44cdd1

Please sign in to comment.