Added a null check to prevent a NullPointerException to be thrown in

getUserByEmail if there is no user for a given email address
This commit is contained in:
Steffen Schaefer committed 2016-07-07 10:49:17 +02:00
1 parent 7ecc533f8e
commit 5004b250f0
1 file changed
+1 -1
@@ -320,7 +320,7 @@ public class UserStoreImpl implements UserStore {
result = null;
} else {
Set<User> set = usersByEmail.get(email);
if (set.isEmpty()) {
if (set == null || set.isEmpty()) {
result = null;
} else {
result = set.iterator().next();