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

Implementation of iterator method fails for empty collections #11

Open
phronmophobic opened this issue Oct 9, 2023 · 1 comment
Open

Comments

@phronmophobic
Copy link
Contributor

An easy way to reproduce is as follows:

tiara.data> (into [] (ordered-set))
Execution error (NullPointerException) at tiara.data.VecSet/iterator (data.clj:201).
Cannot invoke "java.util.Collection.iterator()" because the return value of "clojure.lang.IFn.invoke(Object)" is null
tiara.data> (into [] (ordered-map))
Execution error (NullPointerException) at tiara.data.VecMap/iterator (data.clj:58).
Cannot invoke "java.util.Collection.iterator()" because the return value of "clojure.lang.IFn.invoke(Object)" is null

I would be happy to submit a pull request, but I'm not actually sure what kind of fix would make sense.

Thanks for the library!

@phronmophobic
Copy link
Contributor Author

Here is the workaround I'm currently using, phronmophobic@897d247. Not sure if it's a good solution, but it passes all the tests.

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

1 participant