Add proper tests for fluent-interface pattern and fixed a little bug

This commit is contained in:
Jeroen Meulemeester
2015-12-12 20:16:10 +01:00
parent df69a8f986
commit 4181514c65
5 changed files with 222 additions and 1 deletions

View File

@@ -215,7 +215,7 @@ public class LazyFluentIterable<TYPE> implements FluentIterable<TYPE> {
return new DecoratingIterator<TYPE>(iterable.iterator()) {
@Override
public TYPE computeNext() {
return fromIterator.next();
return fromIterator.hasNext() ? fromIterator.next() : null;
}
};
}