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:
Gary D. Gregory 2013-11-19 00:36:29 +00:00
parent 584a10fda5
commit aa0c114ac9
1 changed files with 2 additions and 4 deletions

View File

@ -280,17 +280,15 @@ public class CircularFifoQueue<E> extends AbstractCollection<E>
public E poll() { public E poll() {
if (isEmpty()) { if (isEmpty()) {
return null; return null;
} else {
return remove();
} }
return remove();
} }
public E element() { public E element() {
if (isEmpty()) { if (isEmpty()) {
throw new NoSuchElementException("queue is empty"); throw new NoSuchElementException("queue is empty");
} else {
return peek();
} }
return peek();
} }
public E peek() { public E peek() {