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 ; }
Remove a role from the list of defined roles .