This is an automated email from the ASF dual-hosted git repository. ethanli pushed a commit to branch 2.2.x-branch in repository https://gitbox.apache.org/repos/asf/storm.git
commit 46a8ece28ee27f3313e94afcf6582b63105eefac Author: Meng (Ethan) Li <[email protected]> AuthorDate: Mon Sep 20 20:23:10 2021 -0500 [STORM-3767] Follow up: fix NullPointerException in getUnixGroups --- .../jvm/org/apache/storm/security/auth/ShellBasedGroupsMapping.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/storm-client/src/jvm/org/apache/storm/security/auth/ShellBasedGroupsMapping.java b/storm-client/src/jvm/org/apache/storm/security/auth/ShellBasedGroupsMapping.java index 31d00dc..c80e293 100644 --- a/storm-client/src/jvm/org/apache/storm/security/auth/ShellBasedGroupsMapping.java +++ b/storm-client/src/jvm/org/apache/storm/security/auth/ShellBasedGroupsMapping.java @@ -105,6 +105,11 @@ public class ShellBasedGroupsMapping implements * @throws IOException if encounter any error when running the command */ private Set<String> getUnixGroups(final String user) throws IOException { + if (user == null) { + LOG.debug("User is null. Returning an empty set as the result"); + return new HashSet<>(); + } + String result; try { result = shellCommandRunner.execCommand(ShellUtils.getGroupsForUserCommand(user));
