Skip to content

style: include IT_NO_SUCH_ELEMENT #5200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ public boolean hasNext() {

@Override
public T next() {
node = node.next;
return node.data;
if (hasNext()) {
node = node.next;
return node.data;
}
throw new NoSuchElementException();
}
};
}
Expand Down
Loading