Skip to content
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

Iterables.sizeOf(Iterable<?> iterable) runs into inf. loop for non-collection Iterables #13

Closed
hoesler opened this issue Oct 29, 2012 · 3 comments
Assignees

Comments

@hoesler
Copy link

hoesler commented Oct 29, 2012

Iterator<?> iterator = iterable.iterator();
while (iterator.hasNext()) {
size++;
}

The .next() is missing.

By the way: Why did you bake your own Iterables etc. utility classes? I would suggest to use the guava lib for these tasks.

@joel-costigliola
Copy link
Contributor

You are obviously right, we screwed up this one.

We don't want any third party library dependency in fest-assert-core or fest-util, to avoid Fest users to manage transitive dependencies (what if we use a version Guava not compatible with the one on your project ?).
If we pick Guava then Joda-time will come, then commons-lang, etc ...

By the way, if you are interested in Guava assertions, I'm starting a Fest module dedicated to Guava to provide for example Multimap assertions, check the progress here : https://github.com/joel-costigliola/fest-guava-assert.

@alexruiz
Copy link
Owner

Joel, can you take care of this one? :)

I could fix it on my side, but in the current state of my local repo I can't push changes yet.

@alexruiz
Copy link
Owner

I closed this issue by mistake! :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants