Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
4.4, 4.4.1, 4.4.2, 4.4.3, 4.4.4, 4.4.5, 5.0.1, 5.0.2, 5.0.3, 5.0.4, 5.0.5
-
4.04
-
Description
A NullPointerException is thrown when trying to use the following code:
globalPermissionManager.getGroupsWithPermission(globalPermissionId);
java.lang.NullPointerException at com.atlassian.crowd.embedded.impl.IdentifierUtils.toLowerCase(IdentifierUtils.java:42) at com.atlassian.crowd.embedded.core.FilteredCrowdServiceImpl.isGroupToBeFiltered(FilteredCrowdServiceImpl.java:340) at com.atlassian.crowd.embedded.core.FilteredCrowdServiceImpl.getGroup(FilteredCrowdServiceImpl.java:73) at com.atlassian.jira.security.DefaultGlobalPermissionManager.getGroupsWithPermission(DefaultGlobalPermissionManager.java:260)
The problem is that we have a global permission (Browse Users) assigned to group Anyone, but I can confirm that this happens for any other global permission and that removing the permission for group Anyone resolves this.
This happens because group Anyone has a null name.
IdentifierUtils contains:
public static String toLowerCase(String identifier) { return identifier.toLowerCase(IDENTIFIER_COMPARE_LOCALE); // identifier is null here }