From 4aab06b9a79a40d24b6cabab0f795df0880c807a Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 23 Sep 2015 23:18:26 +0200 Subject: fix NullPointerException if moa-id-configuration user has only bPK identifier and username and password is requested --- .../config/usermanagement/FileBasedUserConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'id/ConfigWebTool/src') diff --git a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/usermanagement/FileBasedUserConfiguration.java b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/usermanagement/FileBasedUserConfiguration.java index b1bba7289..986dc0db5 100644 --- a/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/usermanagement/FileBasedUserConfiguration.java +++ b/id/ConfigWebTool/src/main/java/at/gv/egovernment/moa/id/configuration/config/usermanagement/FileBasedUserConfiguration.java @@ -208,7 +208,8 @@ public class FileBasedUserConfiguration List allUsers = getAllUsers(); for (UserDatabase user : nullGuard(allUsers)) { - if (user.getUsername().equals(username)) { + if (MiscUtil.isNotEmpty(user.getUsername()) + && user.getUsername().equals(username)) { result = user; break; } -- cgit v1.2.3