Skip to content
Snippets Groups Projects
Commit 851c1d00 authored by nikgr117's avatar nikgr117
Browse files

Don't perform IAction on null objects

parent 3ff1d0cc
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ public class Enumerable<T> implements Iterable<T> {
void forEach(IAction<T> action) {
while (iterator.hasNext()) {
T t = (T) iterator.next();
if (t == null) break;
action.perform(t);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment