public void add(Permission perm) { if (isReadOnly()) { throw new SecurityException( "PermissionCollection is read only"); } final Class permClass = perm.getClass(); if (perm instanceof AllPermission) { if (allPermission == null) {
public void add(Permission perm) { if (isReadOnly()) throw new SecurityException("PermissionCollection is read only"); if (perm instanceof AllPermission) { if (allPermission == null) {
    public void add(Permission perm) {        if (isReadOnly()) { throw new SecurityException(                "PermissionCollection is read only"); }        final Class permClass = perm.getClass();        if (perm instanceof AllPermission) {            if (allPermission == null) {                allPermission = perm.newPermissionCollection();                allPermission.add(perm);                perms.put(permClass, allPermission);            }        } else {            PermissionCollection pc = (PermissionCollection) perms                    .get(permClass);            if (pc == null) {                pc = perm.newPermissionCollection();                if (pc == null) {                    pc = new PermissionsHash();                }                perms.put(permClass, pc);            }            pc.add(perm);        }    }