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

DatastoreImpl bulk insert with an empty Iterable causes an error. #903

Closed
kstafford3 opened this issue Feb 27, 2016 · 0 comments
Closed
Labels
Milestone

Comments

@kstafford3
Copy link

DatastoreImpl's bulk insert does not check hasNext() before calling next(). If there is no first element in the iterable, a NoSuchElementException is thrown.

Similarly, when using the vararg bulk insert, entities[0] throws an ArrayIndexOutOfBoundsException.

morphia: 1.2.0-SNAPSHOT
java 1.8.0_66
mongodb: 3.2

@kstafford3 kstafford3 changed the title DatastoreImpl Insert with an empty Iterable causes an error. DatastoreImpl bulk insert with an empty Iterable causes an error. Feb 27, 2016
@evanchooly evanchooly added the bug label May 17, 2016
@evanchooly evanchooly added this to the 1.2.0 milestone May 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants