style: include IT_NO_SUCH_ELEMENT
(#5200)
This commit is contained in:
parent
f3db699083
commit
493942e319
@ -77,9 +77,6 @@
|
||||
<Match>
|
||||
<Bug pattern="UWF_UNWRITTEN_FIELD" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="IT_NO_SUCH_ELEMENT" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
|
||||
</Match>
|
||||
|
@ -148,8 +148,11 @@ public class LinkedQueue<T> implements Iterable<T> {
|
||||
|
||||
@Override
|
||||
public T next() {
|
||||
node = node.next;
|
||||
return node.data;
|
||||
if (hasNext()) {
|
||||
node = node.next;
|
||||
return node.data;
|
||||
}
|
||||
throw new NoSuchElementException();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user