Statement unnecessarily nested within else clause.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1543246 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
584a10fda5
commit
aa0c114ac9
|
@ -280,17 +280,15 @@ public class CircularFifoQueue<E> extends AbstractCollection<E>
|
|||
public E poll() {
|
||||
if (isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
return remove();
|
||||
}
|
||||
return remove();
|
||||
}
|
||||
|
||||
public E element() {
|
||||
if (isEmpty()) {
|
||||
throw new NoSuchElementException("queue is empty");
|
||||
} else {
|
||||
return peek();
|
||||
}
|
||||
return peek();
|
||||
}
|
||||
|
||||
public E peek() {
|
||||
|
|
Loading…
Reference in New Issue