diff --git a/src/main/java/org/ovirt/engine/extension/aaa/misc/QueryExecutor.java b/src/main/java/org/ovirt/engine/extension/aaa/misc/QueryExecutor.java index 8e71455..b94a791 100644 --- a/src/main/java/org/ovirt/engine/extension/aaa/misc/QueryExecutor.java +++ b/src/main/java/org/ovirt/engine/extension/aaa/misc/QueryExecutor.java @@ -93,8 +93,14 @@ public ExtMap buildPrincipalRecord(Map headers, String nameArg, } public Collection buildPrincipalRecordGroups(Map headers, String groupsArg) { + List groupNames; + if (headers.containsKey(groupsArg)) { + groupNames = Arrays.asList(headers.get(groupsArg).split(",")); + } else { + return Collections.emptyList(); + } + LinkedList groups = new LinkedList<>(); - List groupNames = Arrays.asList(headers.get(groupsArg).split(",")); for (String groupName : groupNames) { groupName = groupName.replaceFirst("^/", ""); ExtMap group = new ExtMap();