code: public synchronized Object removeRoleMapping(final String roleName) {
          /*
           * Would not expect this to happen during boot so don't offer the 'immediate' optimisation.
           */
          HashMap<String, RoleMappingImpl> newRoles = new HashMap<String, RoleMappingImpl>(roleMappings);
          if (newRoles.containsKey(roleName)) {
              RoleMappingImpl removed = newRoles.remove(roleName);
              Object removalKey = new Object();
              removedRoles.put(removalKey, removed);
              roleMappings = Collections.unmodifiableMap(newRoles);
  
              return removalKey;
          }
  
          return null;
      }
docs: Remove a role from the list of defined roles.
  
  @param roleName - The name of the role to be removed.
  @return A key that can be used to undo the removal.