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

NullPointerException when deleting by criteria #9

Open
detonator413 opened this issue Sep 29, 2017 · 4 comments
Open

NullPointerException when deleting by criteria #9

detonator413 opened this issue Sep 29, 2017 · 4 comments

Comments

@detonator413
Copy link
Contributor

The following code example will throw an NPE:
deleteQuery.withCriteria("fieldName", Arrays.asList(null));

@AkashMahajan1997
Copy link

deleteQuery.withCriteria("fieldName", Arrays.asList(null));

There is null pointer exception because
1)asList(null) May be null

@mithunsasidharan
Copy link

@detonator413 : can I pick this up ?

@detonator413
Copy link
Contributor Author

Sure, go ahead

@Double-A-92
Copy link

@mithunsasidharan There is nothing to fix here... The NPE is thrown because the code is wrong, it has nothing to do with ".withCriteria".

It comes from "Arrays.asList(null)" because you literally pass null into it.

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

No branches or pull requests

4 participants