From 0a08382db81c55c5bc3c1b7871b465b5b717eb7d Mon Sep 17 00:00:00 2001 From: Ainur Date: Fri, 9 Aug 2024 15:36:31 +0200 Subject: [PATCH] CB-5386 fix npe --- .../src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java b/server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java index bfbd2778b2..d79e472aa5 100644 --- a/server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java +++ b/server/bundles/io.cloudbeaver.service.admin/src/io/cloudbeaver/service/admin/impl/WebServiceAdmin.java @@ -72,6 +72,9 @@ public class WebServiceAdmin implements DBWServiceAdmin { public AdminUserInfo getUserById(@NotNull WebSession webSession, @NotNull String userId) throws DBWebException { try { SMUser smUser = webSession.getAdminSecurityController().getUserById(userId); + if (smUser == null) { + throw new DBException("User '" + userId + "' not found"); + } return new AdminUserInfo(webSession, new WebUser(smUser)); } catch (Exception e) { throw new DBWebException("Error getting user - " + userId, e);