mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-10 21:43:15 +08:00
style: include IT_NO_SUCH_ELEMENT
(#5200)
This commit is contained in:
@ -77,9 +77,6 @@
|
|||||||
<Match>
|
<Match>
|
||||||
<Bug pattern="UWF_UNWRITTEN_FIELD" />
|
<Bug pattern="UWF_UNWRITTEN_FIELD" />
|
||||||
</Match>
|
</Match>
|
||||||
<Match>
|
|
||||||
<Bug pattern="IT_NO_SUCH_ELEMENT" />
|
|
||||||
</Match>
|
|
||||||
<Match>
|
<Match>
|
||||||
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
|
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
|
||||||
</Match>
|
</Match>
|
||||||
|
@ -148,9 +148,12 @@ public class LinkedQueue<T> implements Iterable<T> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public T next() {
|
public T next() {
|
||||||
|
if (hasNext()) {
|
||||||
node = node.next;
|
node = node.next;
|
||||||
return node.data;
|
return node.data;
|
||||||
}
|
}
|
||||||
|
throw new NoSuchElementException();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user