public void add(Permission permission){
  if (!(permission instanceof FilePermission))   throw new IllegalArgumentException("invalid permission: " + permission);
  if (isReadOnly())   throw new SecurityException("attempt to add a Permission to a readonly PermissionCollection");
synchronized (this) {
    perms.add(permission);
  }
}

public void add ( Permission permission ) { if ( ! ( permission instanceof FilePermission ) ) throw new IllegalArgumentException ( "invalid permission: " + permission ) ; if ( isReadOnly ( ) ) throw new SecurityException ( "attempt to add a Permission to a readonly PermissionCollection" ) ; synchronized ( this ) { perms . add ( permission ) ; } }
adds a permission to the filepermissioncollection . the key for the hash is permission . path .
